Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | From 9984ae5cb0ea0d61df1612b06952a61323c083d9 Mon Sep 17 00:00:00 2001 |
| 2 | From: Florian Weimer <fweimer@redhat.com> |
| 3 | Date: Mon, 17 Nov 2014 11:13:38 +0100 |
| 4 | Subject: [PATCH 1/4] outof: Introduce expandaddr flag |
| 5 | |
| 6 | Document that address expansion is disabled unless the expandaddr |
| 7 | binary option is set. |
| 8 | |
| 9 | This has been assigned CVE-2014-7844 for BSD mailx, but it is not |
| 10 | a vulnerability in Heirloom mailx because this feature was documented. |
| 11 | |
| 12 | This patch is taken from |
| 13 | ftp://ftp.debian.org/debian/pool/main/h/heirloom-mailx/heirloom-mailx_12.5-5.debian.tar.xz |
| 14 | |
| 15 | Upstream-Status: Inappropriate [upstream is dead] |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 16 | CVE: CVE-2014-7844 |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 17 | --- |
| 18 | mailx.1 | 14 ++++++++++++++ |
| 19 | names.c | 3 +++ |
| 20 | 2 files changed, 17 insertions(+) |
| 21 | |
| 22 | diff --git a/mailx.1 b/mailx.1 |
| 23 | index 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 |
| 54 | diff --git a/names.c b/names.c |
| 55 | index 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 | -- |
| 69 | 1.9.3 |
| 70 | |
| 71 | |