1 From a1f36d86760def10138c1053eb3b1882b281fcd9 Mon Sep 17 00:00:00 2001
2 From: Qualys Security Advisory <qsa@qualys.com>
3 Date: Sun, 21 Feb 2021 21:53:55 -0800
4 Subject: [PATCH 14/29] CVE-2020-28012: Missing close-on-exec flag for
9 1 file changed, 4 insertions(+)
11 diff --git a/src/rda.c b/src/rda.c
12 index 13f570928..c27e073a3 100644
15 @@ -623,9 +623,13 @@ search_tidyup();
16 if ((pid = fork()) == 0)
18 header_line *waslast = header_last; /* Save last header */
22 (void)close(pfd[pipe_read]);
24 + if ((fd_flags = fcntl(fd, F_GETFD)) == -1) goto bad;
25 + if (fcntl(fd, F_SETFD, fd_flags | FD_CLOEXEC) == -1) goto bad;
26 exim_setugid(ugid->uid, ugid->gid, FALSE, rname);
28 /* Addresses can get rewritten in filters; if we are not root or the exim