Open Bill-Sommerfeld opened 1 year ago
I could confirm that your patch fixes the crash when the milter was called on the end of the message every times on FreeBSD 14.1-RELEASE. Thank you.
(On FreeBSD 14.0-RELEASE, HAVE_RES_NINIT was not defined because of the issue #257)
The documentation of
res_ninit()
is inconsistent across different operating systems but generally the caller must zero some or all of the argument structure before callingres_ninit()
This is done consistently in
opendmarc_spf_dns.c
(memset before res_ninit) but not inopendmarc_dns.c
:https://github.com/trusteddomainproject/OpenDMARC/blob/9cebf724d601452d1a671ed5331551dbc18df83a/libopendmarc/opendmarc_dns.c#L205-L207
I got a burst of crashes a few hours after enabling opendmarc:
evidently due to non-zero stack garbage in the memory used for
resp
. Fix is straightforward: