trusteddomainproject / OpenDMARC

This is the Trusted Domain Project's impementation of the DMARC protocol libary and mail filter, called OpenDMARC. A "milter" connects to unix-based mailers (originally, sendmail, but now many) and provides a standard filtering API.
Other
100 stars 53 forks source link

OpenDMARC 1.4.1.1-1 core dumps with signal 6 (ABRT) when receiving e-mail from certain domains #186

Open AstroPig7 opened 3 years ago

AstroPig7 commented 3 years ago

Since upgrading to OpenDMARC 1.4.1.1-1, I’ve seen the program crash when receiving e-mail from domains like amazon.com, usps.com, and humblebundle.com. There doesn’t seem to be anything strange about their TXT records, so I assume something in the format of the e-mail is causing OpenDMARC to crash. From the system journal: Aug 26 07:32:05 mailx systemd[1]: opendmarc.service: Main process exited, code=dumped, status=6/ABRT

The stack traces:

PID: 382488 (opendmarc)
UID: 335 (opendmarc)
Signal: 6 (ABRT)
Timestamp: Thu 2021-08-26 07:32:04 CDT (26min ago)
Command Line: /usr/bin/opendmarc -c /etc/opendmarc/opendmarc.conf
Executable: /usr/bin/opendmarc
Control Group: /system.slice/opendmarc.service
Unit: opendmarc.service
Slice: system.slice
Message: Process 382488 (opendmarc) of user 335 dumped core.

                Found module linux-vdso.so.1 with build-id: 68f6e36e0fd83223b553b19c82de3c4a799f606e
                Found module libnss_files.so.2 with build-id: 1a36dfc01d3a1010b2ee79766a24a8090a3266d5
                Found module libkeyutils.so.1 with build-id: ac405ddd17be10ce538da3211415ee50c8f8df79
                Found module libkrb5support.so.0 with build-id: c4ee4ad1dc2da57487bc2419b88f1b6873184582
                Found module libcom_err.so.2 with build-id: eb61ef71c8b97846db759fb89a115405cff6dd30
                Found module libk5crypto.so.3 with build-id: 632a59ed7c35704d84645e6d1e9873348d1eb802
                Found module libkrb5.so.3 with build-id: c61cb4da63b8a839ee7df99eaf9dbd3d0968534c
                Found module libgssapi_krb5.so.2 with build-id: 9be9d3348399b72b76161a64e6d9fd760b77163a
                Found module libtirpc.so.3 with build-id: 5bef2adfdee3df283f593b3e2d37b6dac405256a
                Found module libnsl.so.2 with build-id: 483b18a0f5dea898b7a147c1662214049d1e5786
                Found module libmd.so.0 with build-id: 904612daabb619ff53b5daeef45c79d28cc3f29d
                Found module libdl.so.2 with build-id: 5abc547e7b0949f89f3c0e21ab0c8331a7440a8a
                Found module ld-linux-x86-64.so.2 with build-id: 040cc3dd10461562f177df39e3be2f3704258c3c
                Found module libidn.so.12 with build-id: a03952cbdf12d9d512b58a73b3b9e9bd418da682
                Found module librt.so.1 with build-id: 75484da2d6f1515189eefa076e0a40328834cd16
                Found module libspf2.so.2 with build-id: e684c29b162675e6ad65862b0a74dba5f03eb945
                Found module libm.so.6 with build-id: 2b8fd1f869ecab4e0b55e92f2f151897f6818acf
                Found module libc.so.6 with build-id: 4b406737057708c0e4c642345a703c47a61c73dc
                Found module libbsd.so.0 with build-id: a1e665d4441263b636ef82647e2b16c05be14fd4
                Found module libresolv.so.2 with build-id: c915c72668282861a813f7ea3c0780f37b681dc0
                Found module libpthread.so.0 with build-id: 07c8f95b4f3251d08550217ad8a1f31066229996
                Found module libopendmarc.so.2 with build-id: 6de096e031a403e9e58185d067b571abf71adc60
                Found module opendmarc with build-id: 1cd9da2eb4e7cb4d39164a8059f4028c51a46573
                Stack trace of thread 382488:
                #0  0x00007f4ba83cbd22 raise (libc.so.6 + 0x3cd22)
                #1  0x00007f4ba83b5862 abort (libc.so.6 + 0x26862)
                #2  0x00007f4ba83b5747 __assert_fail_base.cold (libc.so.6 + 0x26747)
                #3  0x00007f4ba83c4616 __assert_fail (libc.so.6 + 0x35616)
                #4  0x00005577d888be40 n/a (opendmarc + 0x6e40)
                #5  0x00005577d8889c90 n/a (opendmarc + 0x4c90)
                #6  0x00007f4ba83b6b25 __libc_start_main (libc.so.6 + 0x27b25)
                #7  0x00005577d888ae1e n/a (opendmarc + 0x5e1e)

                Stack trace of thread 382489:
                #0  0x00007f4ba83ccae2 __sigtimedwait (libc.so.6 + 0x3dae2)
                #1  0x00007f4ba859f3ac sigwait (libpthread.so.0 + 0x133ac)
                #2  0x00005577d888bb0c n/a (opendmarc + 0x6b0c)
                #3  0x00007f4ba8595259 start_thread (libpthread.so.0 + 0x9259)
                #4  0x00007f4ba848d5e3 __clone (libc.so.6 + 0xfe5e3)

                Stack trace of thread 382491:
                #0  0x00007f4ba8482b2f __poll (libc.so.6 + 0xf3b2f)
                #1  0x00005577d88976b3 n/a (opendmarc + 0x126b3)
                #2  0x00007f4ba8595259 start_thread (libpthread.so.0 + 0x9259)
                #3  0x00007f4ba848d5e3 __clone (libc.so.6 + 0xfe5e3)

                Stack trace of thread 382492:
                #0  0x00007f4ba85a18ca __futex_abstimed_wait_common64 (libpthread.so.0 + 0x158ca)
                #1  0x00007f4ba859b574 pthread_cond_timedwait@@GLIBC_2.3.2 (libpthread.so.0 + 0xf574)
                #2  0x00005577d8897e52 n/a (opendmarc + 0x12e52)
                #3  0x00007f4ba8595259 start_thread (libpthread.so.0 + 0x9259)
                #4  0x00007f4ba848d5e3 __clone (libc.so.6 + 0xfe5e3)

                Stack trace of thread 382493:
                #0  0x00007f4ba859e79c read (libpthread.so.0 + 0x1279c)
                #1  0x00007f4ba857aab9 n/a (libresolv.so.2 + 0x8ab9)
                #2  0x00007f4ba857c223 n/a (libresolv.so.2 + 0xa223)
                #3  0x00007f4ba8579104 __res_context_query (libresolv.so.2 + 0x7104)
                #4  0x00007f4ba8579793 __res_nquery (libresolv.so.2 + 0x7793)
                #5  0x00007f4ba823246a n/a (libspf2.so.2 + 0x946a)
                #6  0x00007f4ba82313d3 SPF_dns_lookup (libspf2.so.2 + 0x83d3)
                #7  0x00007f4ba8231dda n/a (libspf2.so.2 + 0x8dda)
                #8  0x00007f4ba82313d3 SPF_dns_lookup (libspf2.so.2 + 0x83d3)
                #9  0x00007f4ba823b4ad SPF_server_get_record (libspf2.so.2 + 0x124ad)
                #10 0x00007f4ba8239ffe SPF_request_query_mailfrom (libspf2.so.2 + 0x10ffe)
                #11 0x00007f4ba85b6c27 opendmarc_spf2_test (libopendmarc.so.2 + 0x9c27)
                #12 0x00005577d888eff6 n/a (opendmarc + 0x9ff6)
                #13 0x00005577d889ac6c n/a (opendmarc + 0x15c6c)
                #14 0x00005577d8897cb0 n/a (opendmarc + 0x12cb0)
                #15 0x00007f4ba8595259 start_thread (libpthread.so.0 + 0x9259)
                #16 0x00007f4ba848d5e3 __clone (libc.so.6 + 0xfe5e3)

                Stack trace of thread 382494:
                #0  0x00007f4ba85a18ca __futex_abstimed_wait_common64 (libpthread.so.0 + 0x158ca)
                #1  0x00007f4ba859b574 pthread_cond_timedwait@@GLIBC_2.3.2 (libpthread.so.0 + 0xf574)
                #2  0x00005577d8897e52 n/a (opendmarc + 0x12e52)
                #3  0x00007f4ba8595259 start_thread (libpthread.so.0 + 0x9259)
                #4  0x00007f4ba848d5e3 __clone (libc.so.6 + 0xfe5e3)

                Stack trace of thread 382495:
                #0  0x00007f4ba85a18ca __futex_abstimed_wait_common64 (libpthread.so.0 + 0x158ca)
                #1  0x00007f4ba859b574 pthread_cond_timedwait@@GLIBC_2.3.2 (libpthread.so.0 + 0xf574)
                #2  0x00005577d8897e52 n/a (opendmarc + 0x12e52)
                #3  0x00007f4ba8595259 start_thread (libpthread.so.0 + 0x9259)
                #4  0x00007f4ba848d5e3 __clone (libc.so.6 + 0xfe5e3)
glts commented 3 years ago

Unfortunately these stack traces are not terribly useful without line numbers. Make sure debug symbols are available. Also be sure that you have applied the patch set in #178.