[exim-dev] [Bug 1721] DKIM hash incorrect when ending lines …

Page principale
Supprimer ce message
Répondre à ce message
Auteur: admin
Date:  
À: exim-dev
Sujet: [exim-dev] [Bug 1721] DKIM hash incorrect when ending lines have spaces
https://bugs.exim.org/show_bug.cgi?id=1721

Wolfgang Breyha <wbreyha@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wbreyha@???


--- Comment #8 from Wolfgang Breyha <wbreyha@???> ---
I got several SIGSEGV after applying this patch....

coredump shows:
#0  0x00000000004e4678 in pdkim_bodyline_complete (ctx=0x1625570) at
pdkim.c:1046
#1  0x00000000004e4a8e in pdkim_feed (ctx=0x1625570, 
    data=0x16c1370 "X-No-Relay: not in my network\r\nX-No-Relay: not in my
network\r\nX-No-Relay: not in my network\r\nX-No-Relay: not in my
network\r\nX-No-Relay: not in my network\r\nX-No-Relay: not in my
network\r\nX-No-Relay: no"..., len=4096) at pdkim.c:1178
#2  0x000000000045957c in dkim_exim_verify_feed (
    data=0x16c1370 "X-No-Relay: not in my network\r\nX-No-Relay: not in my
network\r\nX-No-Relay: not in my network\r\nX-No-Relay: not in my
network\r\nX-No-Relay: not in my network\r\nX-No-Relay: not in my
network\r\nX-No-Relay: no"..., len=4096) at dkim.c:80
#3  0x00000000004a349b in tls_getc () at tls-openssl.c:2289
#4  0x000000000047a34a in receive_msg (extract_recip=0) at receive.c:1604
#5  0x000000000042426a in handle_smtp_call (listen_sockets=0x156b8a8,
listen_socket_count=2, accept_socket=5, accepted=0x7ffe8847feb0)
    at daemon.c:513
#6  0x0000000000427227 in daemon_go () at daemon.c:2040
#7  0x00000000004436ca in main (argc=5, cargv=0x7ffe884c09f8) at exim.c:4729


(gdb) l
1041      if (memcmp(p,"\r\n",2) == 0) {
1042        ctx->num_buffered_crlf++;
1043        goto BAIL;
1044      }
1045    
1046      if (ctx->sig->canon_body == PDKIM_CANON_RELAXED) {
1047        /* Lines with just spaces need to be buffered too */
1048        char *check = p;
1049        while(memcmp(check,"\r\n",2) != 0) {
1050            char c = *check;
(gdb) print ctx
$1 = (pdkim_ctx *) 0x1625570
(gdb) print ctx->sig
$2 = (pdkim_signature *) 0x0



IMO 1046 should read
if (ctx->sig && ctx->sig->canon_body == PDKIM_CANON_RELAXED) {

--
You are receiving this mail because:
You are on the CC list for the bug.