diff options
author | Dima Panov <fluffy@FreeBSD.org> | 2018-05-03 23:17:24 +0000 |
---|---|---|
committer | Dima Panov <fluffy@FreeBSD.org> | 2018-05-03 23:17:24 +0000 |
commit | 4e17d75935f3f1de8b0fb66b7e07bc0b78ff2fcb (patch) | |
tree | ad0510167bb2bc95774585439f77f095e5cb6818 /mail/opensmtpd-devel/files/patch-smtpd-rfc2822.c | |
parent | - Add DIALOG4PORTS option (default on) to install it for 'options' command [1]. (diff) |
- Prevent OpenSMTPD session hangs and retain a descriptor forever on empty body
(i.e. when the dot appears on the line directly after the headers).
This could be used by an attacker to exhaust resources.
PR: 227899
Submitted by: grembo
Obtained from: OpenSMTPD git repo (backported)
MFH: 2018Q2
Diffstat (limited to 'mail/opensmtpd-devel/files/patch-smtpd-rfc2822.c')
-rw-r--r-- | mail/opensmtpd-devel/files/patch-smtpd-rfc2822.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mail/opensmtpd-devel/files/patch-smtpd-rfc2822.c b/mail/opensmtpd-devel/files/patch-smtpd-rfc2822.c new file mode 100644 index 000000000000..67952346556e --- /dev/null +++ b/mail/opensmtpd-devel/files/patch-smtpd-rfc2822.c @@ -0,0 +1,19 @@ +--- smtpd/rfc2822.c.orig 2018-05-01 13:33:10.000000000 +0000 ++++ smtpd/rfc2822.c 2018-05-01 13:34:47.931554000 +0000 +@@ -53,4 +53,7 @@ + struct rfc2822_hdr_miss_cb *hdr_miss_cb; ++ ++ if (!rp->in_hdr) ++ goto end; + + TAILQ_FOREACH(hdr_cb, &rp->hdr_cb, next) + if (strcasecmp(hdr_cb->name, rp->header.name) == 0) { +@@ -151,6 +152,8 @@ + return; + + header_callback(rp); ++ ++ missing_headers_callback(rp); + } + + void |