haraka / Haraka

A fast, highly extensible, and event driven SMTP server
https://haraka.github.io
MIT License
5.09k stars 661 forks source link

dkim crash error #2286

Closed msimerson closed 7 years ago

msimerson commented 7 years ago

system info

Haraka Haraka.js — Version: 2.8.16
Node v6.11.5
OS FreeBSD haraka 10.4-RELEASE FreeBSD 10.4-RELEASE #0 r324094: Fri Sep 29 01:45:44 UTC 2017 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
openssl OpenSSL 1.0.1u-freebsd 22 Sep 2016

Expected behavior

no crash

Observed behavior

Nov  2 14:01:00 haraka haraka: [CRIT] [-] [core] TypeError: Cannot read property 'Symbol(Symbol.iterator)' of null
Nov  2 14:01:00 haraka haraka: [CRIT] [-] [core]     at DKIMVerifyStream.handle_buf (/usr/local/lib/node_modules/Haraka/dkim.js:501:81)
Nov  2 14:01:00 haraka haraka: [CRIT] [-] [core]     at DKIMVerifyStream.write (/usr/local/lib/node_modules/Haraka/dkim.js:557:21)
Nov  2 14:01:00 haraka haraka: [CRIT] [-] [core]     at MessageStream.ondata (internal/streams/legacy.js:16:26)
Nov  2 14:01:00 haraka haraka: [CRIT] [-] [core]     at emitOne (events.js:96:13)
Nov  2 14:01:00 haraka haraka: [CRIT] [-] [core]     at MessageStream.emit (events.js:188:7)
Nov  2 14:01:00 haraka haraka: [CRIT] [-] [core]     at ChunkEmitter.<anonymous> (/usr/local/lib/node_modules/Haraka/messagestream.js:351:22)
Nov  2 14:01:00 haraka haraka: [CRIT] [-] [core]     at emitOne (events.js:96:13)
Nov  2 14:01:00 haraka haraka: [CRIT] [-] [core]     at ChunkEmitter.emit (events.js:188:7)
Nov  2 14:01:00 haraka haraka: [CRIT] [-] [core]     at ChunkEmitter.fill (/usr/local/lib/node_modules/Haraka/chunkemitter.js:43:22)
Nov  2 14:01:00 haraka haraka: [CRIT] [-] [core]     at MessageStream.process_buf (/usr/local/lib/node_modules/Haraka/messagestream.js:293:26)
Nov  2 14:01:00 haraka haraka: [NOTICE] [-] [core] Shutting down
Nov  2 14:01:00 haraka haraka: [NOTICE] [-] [core] worker 2 exited with error code: 1

Steps to reproduce

msimerson commented 7 years ago

more data:

Nov  2 14:11:00 haraka haraka: [NOTICE] [9C75AA1D-DA4E-4D46-986D-6EBFA8847C89] [core] connect ip=74.222.27.205 port=54261 local_ip=172.16.15.9 local_port=25
Nov  2 14:11:01 haraka haraka: [INFO] [9C75AA1D-DA4E-4D46-986D-6EBFA8847C89] [karma] score: 0, good: 0, bad: 0, connections: 72, history: 0
Nov  2 14:11:01 haraka haraka: [INFO] [9C75AA1D-DA4E-4D46-986D-6EBFA8847C89] [p0f] os="Linux 3.1-3.10" link_type="Ethernet or modem" distance=10 total_conn=2
Nov  2 14:11:01 haraka haraka: [INFO] [9C75AA1D-DA4E-4D46-986D-6EBFA8847C89] [fcrdns] ip=74.222.27.205  rdns="designople.net" rdns_len=1 fcrdns="designople.net" fcrdns_len=1 other_ips_len=0 invalid_tlds=0 generic_rdns=true
Nov  2 14:11:02 haraka haraka: [INFO] [9C75AA1D-DA4E-4D46-986D-6EBFA8847C89] [geoip] NA, US, CA, Los Angeles, 1959km
Nov  2 14:11:02 haraka haraka: [INFO] [9C75AA1D-DA4E-4D46-986D-6EBFA8847C89] [dnsbl] fail:truncate.gbudb.net
Nov  2 14:11:02 haraka haraka: [INFO] [9C75AA1D-DA4E-4D46-986D-6EBFA8847C89] [asn] asn: 22439, org: Perfect International, Inc, asn_score: -54, asn_connections: 152, asn_good: 0, asn_bad: 54, fail:asn:all_bad
Nov  2 14:11:06 haraka haraka: [INFO] [9C75AA1D-DA4E-4D46-986D-6EBFA8847C89] [helo.checks] helo_host: designople.net, ips: 74.222.27.205, pass:match_re, bare_ip, dynamic, big_co(not), valid_hostname, rdns_match, forward_dns, host_mismatch
Nov  2 14:11:06 haraka haraka: [INFO] [9C75AA1D-DA4E-4D46-986D-6EBFA8847C89] [spf] identity=helo ip=74.222.27.205 domain="designople.net" mfrom=<postmaster@designople.net> result=Pass
Nov  2 14:11:06 haraka haraka: [INFO] [9C75AA1D-DA4E-4D46-986D-6EBFA8847C89] [spf] scope: helo, result: Pass, domain: designople.net
Nov  2 14:11:10 haraka haraka: [INFO] [9C75AA1D-DA4E-4D46-986D-6EBFA8847C89.1] [spf] identity=mfrom ip=74.222.27.205 domain="designople.net" mfrom=<contact@designople.net> result=Pass
Nov  2 14:11:10 haraka haraka: [INFO] [9C75AA1D-DA4E-4D46-986D-6EBFA8847C89.1] [spf] scope: mfrom, result: Pass, domain: designople.net
Nov  2 14:11:10 haraka haraka: [INFO] [9C75AA1D-DA4E-4D46-986D-6EBFA8847C89.1] [qmail-deliverable] not local
Nov  2 14:11:14 haraka haraka: [INFO] [9C75AA1D-DA4E-4D46-986D-6EBFA8847C89.1] [known-senders] [ 'designople.net' ]
Nov  2 14:11:14 haraka haraka: [INFO] [9C75AA1D-DA4E-4D46-986D-6EBFA8847C89.1] [known-senders] +fcrdns: designople.net
Nov  2 14:11:14 haraka haraka: [NOTICE] [9C75AA1D-DA4E-4D46-986D-6EBFA8847C89.1] [core] sender <contact@designople.net> code=CONT msg=""
Nov  2 14:11:14 haraka haraka: [INFO] [9C75AA1D-DA4E-4D46-986D-6EBFA8847C89.1] [qmail-deliverable] vpopmail dir
Nov  2 14:11:14 haraka haraka: [INFO] [9C75AA1D-DA4E-4D46-986D-6EBFA8847C89.1] [qmail-deliverable] msg:mail_from.not local, pass:rcpt.vpopmail dir
Nov  2 14:11:14 haraka haraka: [INFO] [9C75AA1D-DA4E-4D46-986D-6EBFA8847C89.1] [core]  hook=rcpt plugin=qmail-deliverable function=hook_rcpt params=<alan@******> retval=OK msg=""
Nov  2 14:11:18 haraka haraka: [INFO] [9C75AA1D-DA4E-4D46-986D-6EBFA8847C89.1] [known-senders] ******* : designople.net : null
Nov  2 14:11:18 haraka haraka: [NOTICE] [9C75AA1D-DA4E-4D46-986D-6EBFA8847C89.1] [core] recipient <alan@******> code=OK msg="" sender=contact@designople.net
Nov  2 14:11:23 haraka haraka: [INFO] [9C75AA1D-DA4E-4D46-986D-6EBFA8847C89.1] [geoip] received=74.222.27.205 country=US
Nov  2 14:11:24 haraka haraka: [INFO] [9C75AA1D-DA4E-4D46-986D-6EBFA8847C89.1] [clamd] pass:clean
Nov  2 14:11:24 haraka haraka: [INFO] [9C75AA1D-DA4E-4D46-986D-6EBFA8847C89.1] [rspamd] is_spam: true, is_skipped: false, score: 16.95, required_score: 15, action: reject, BROKEN_HEADERS: 10, DMARC_POLICY_ALLOW: -0.25, PREVIOUSLY_DELIVERED: 0, TO_DN_NONE: 0, RCVD_COUNT_TWO: 0, R_SPF_ALLOW: -0.2, MISSING_DATE: 1, DCC_BULK: 2, MIME_GOOD: -0.1, FROM_HAS_DN: 0, RCPT_COUNT_ONE: 0, RCVD_NO_TLS_LAST: 0, FROM_EQ_ENVFROM: 0, TO_MATCH_ENVRCPT_ALL: 0, ARC_NA: 0, HAS_REPLYTO: 0, ASN: 0, BAYES_SPAM: 4, REPLYTO_DOM_EQ_FROM_DOM: 0, MID_MISSING_BRACKETS: 0.5, R_DKIM_NA: 0, time: 0.474
Nov  2 14:11:24 haraka haraka: [INFO] [9C75AA1D-DA4E-4D46-986D-6EBFA8847C89.1] [spamassassin] skipping, size 1.3MB exceeds max: 488.28kB