blob: 13b955c4b5c85a80a6c269bc0b22173ced4519f0 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001From 9984ae5cb0ea0d61df1612b06952a61323c083d9 Mon Sep 17 00:00:00 2001
2From: Florian Weimer <fweimer@redhat.com>
3Date: Mon, 17 Nov 2014 11:13:38 +0100
4Subject: [PATCH 1/4] outof: Introduce expandaddr flag
5
6Document that address expansion is disabled unless the expandaddr
7binary option is set.
8
9This has been assigned CVE-2014-7844 for BSD mailx, but it is not
10a vulnerability in Heirloom mailx because this feature was documented.
11
12This patch is taken from
13ftp://ftp.debian.org/debian/pool/main/h/heirloom-mailx/heirloom-mailx_12.5-5.debian.tar.xz
14
15Upstream-Status: Inappropriate [upstream is dead]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050016CVE: CVE-2014-7844
Patrick Williamsc124f4f2015-09-15 14:41:29 -050017---
18 mailx.1 | 14 ++++++++++++++
19 names.c | 3 +++
20 2 files changed, 17 insertions(+)
21
22diff --git a/mailx.1 b/mailx.1
23index 70a7859..22a171b 100644
24--- a/mailx.1
25+++ b/mailx.1
26@@ -656,6 +656,14 @@ but any reply returned to the machine
27 will have the system wide alias expanded
28 as all mail goes through sendmail.
29 .SS "Recipient address specifications"
30+If the
31+.I expandaddr
32+option is not set (the default), recipient addresses must be names of
33+local mailboxes or Internet mail addresses.
34+.PP
35+If the
36+.I expandaddr
37+option is set, the following rules apply:
38 When an address is used to name a recipient
39 (in any of To, Cc, or Bcc),
40 names of local mail folders
41@@ -2391,6 +2399,12 @@ and exits immediately.
42 If this option is set,
43 \fImailx\fR starts even with an empty mailbox.
44 .TP
45+.B expandaddr
46+Causes
47+.I mailx
48+to expand message recipient addresses, as explained in the section,
49+Recipient address specifications.
50+.TP
51 .B flipr
52 Exchanges the
53 .I Respond
54diff --git a/names.c b/names.c
55index 66e976b..c69560f 100644
56--- a/names.c
57+++ b/names.c
58@@ -268,6 +268,9 @@ outof(struct name *names, FILE *fo, struct header *hp)
59 FILE *fout, *fin;
60 int ispipe;
61
62+ if (value("expandaddr") == NULL)
63+ return names;
64+
65 top = names;
66 np = names;
67 time(&now);
68--
691.9.3
70
71