summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/logrotate/logrotate/logrotate-CVE-2011-1548.patch
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2014-01-02 03:29:45 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-06 11:13:57 +0000
commit907c8ce6250752fe06476e037b99a6ac88b8500d (patch)
tree92b99fd0b527fe61444199c982d7a947fc2ee043 /meta/recipes-extended/logrotate/logrotate/logrotate-CVE-2011-1548.patch
parent63281708fab30adc4ca1a506deefbf8a54dcce6d (diff)
downloadpoky-907c8ce6250752fe06476e037b99a6ac88b8500d.tar.gz
logrotate: upgrade to 3.8.7
* Upgrade to 3.8.7 * Rename the patches dir from logrotate-3.8.1 -> logrotate * Remove grotate-CVE-2011-1548.patch since it had been fixed * Update act-as-mv-when-rotate.patch and update-the-manual.patch to make them work with the higher version, and send them to the upstream * Fix the HOMEPAGE (From OE-Core rev: e15d7955a98cfd6923775cdb3aa61756d4f58c2d) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/logrotate/logrotate/logrotate-CVE-2011-1548.patch')
-rw-r--r--meta/recipes-extended/logrotate/logrotate/logrotate-CVE-2011-1548.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/meta/recipes-extended/logrotate/logrotate/logrotate-CVE-2011-1548.patch b/meta/recipes-extended/logrotate/logrotate/logrotate-CVE-2011-1548.patch
new file mode 100644
index 0000000000..ed2750e9c3
--- /dev/null
+++ b/meta/recipes-extended/logrotate/logrotate/logrotate-CVE-2011-1548.patch
@@ -0,0 +1,43 @@
1Upstream-Status: Backport
2
3logrotate: fix for CVE-2011-1548
4
5If a logfile is a symlink, it may be read when being compressed, being
6copied (copy, copytruncate) or mailed. Secure data (eg. password files)
7may be exposed.
8
9Portback nofollow.patch from:
10http://logrotate.sourcearchive.com/downloads/3.8.1-5/logrotate_3.8.1-5.debian.tar.gz
11
12Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
13
14---
15--- a/logrotate.c 2012-09-06 13:25:08.000000000 +0800
16+++ b/logrotate.c 2012-09-06 13:35:57.000000000 +0800
17@@ -390,7 +390,7 @@
18 compressedName = alloca(strlen(name) + strlen(log->compress_ext) + 2);
19 sprintf(compressedName, "%s%s", name, log->compress_ext);
20
21- if ((inFile = open(name, O_RDWR)) < 0) {
22+ if ((inFile = open(name, O_RDWR | O_NOFOLLOW)) < 0) {
23 message(MESS_ERROR, "unable to open %s for compression\n", name);
24 return 1;
25 }
26@@ -470,7 +470,7 @@
27 char *mailArgv[] = { mailCommand, "-s", subject, address, NULL };
28 int rc = 0;
29
30- if ((mailInput = open(logFile, O_RDONLY)) < 0) {
31+ if ((mailInput = open(logFile, O_RDONLY | O_NOFOLLOW)) < 0) {
32 message(MESS_ERROR, "failed to open %s for mailing: %s\n", logFile,
33 strerror(errno));
34 return 1;
35@@ -561,7 +561,7 @@
36 message(MESS_DEBUG, "copying %s to %s\n", currLog, saveLog);
37
38 if (!debug) {
39- if ((fdcurr = open(currLog, (flags & LOG_FLAG_COPY) ? O_RDONLY : O_RDWR)) < 0) {
40+ if ((fdcurr = open(currLog, ((flags & LOG_FLAG_COPY) ? O_RDONLY : O_RDWR) | O_NOFOLLOW)) < 0) {
41 message(MESS_ERROR, "error opening %s: %s\n", currLog,
42 strerror(errno));
43 return 1;