summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorTrevor Gamblin <trevor.gamblin@windriver.com>2019-10-15 11:45:32 -0700
committerArmin Kuster <akuster808@gmail.com>2019-11-24 12:48:13 -0800
commit866866c06d6a98b4f9e298a39de7383485751165 (patch)
treea27618429faaa9a4bd53bd78db6c29217c0f1cb0 /meta-oe
parentfdfa4cde192952ca7a63eb058d691e86a8e163fa (diff)
downloadmeta-openembedded-866866c06d6a98b4f9e298a39de7383485751165.tar.gz
rsyslog: fix CVE-2019-17041
Backport fix to zeus; master branch already has v8.1910.0 Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-extended/rsyslog/rsyslog/0001-pmaixforwardedfrom-bugfix-potential-misadressing.patch43
-rw-r--r--meta-oe/recipes-extended/rsyslog/rsyslog_8.1908.0.bb1
2 files changed, 44 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog/0001-pmaixforwardedfrom-bugfix-potential-misadressing.patch b/meta-oe/recipes-extended/rsyslog/rsyslog/0001-pmaixforwardedfrom-bugfix-potential-misadressing.patch
new file mode 100644
index 000000000..0b32766a5
--- /dev/null
+++ b/meta-oe/recipes-extended/rsyslog/rsyslog/0001-pmaixforwardedfrom-bugfix-potential-misadressing.patch
@@ -0,0 +1,43 @@
1From 10549ba915556c557b22b3dac7e4cb73ad22d3d8 Mon Sep 17 00:00:00 2001
2From: Rainer Gerhards <rgerhards@adiscon.com>
3Date: Fri, 27 Sep 2019 13:36:02 +0200
4Subject: [PATCH] pmaixforwardedfrom bugfix: potential misadressing
5
6---
7 contrib/pmaixforwardedfrom/pmaixforwardedfrom.c | 9 +++++++++
8 1 file changed, 9 insertions(+)
9
10Upstream-Status: Backport [https://github.com/rsyslog/rsyslog/pull/3884]
11CVE: CVE-2019-17041
12Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
13
14diff --git a/contrib/pmaixforwardedfrom/pmaixforwardedfrom.c b/contrib/pmaixforwardedfrom/pmaixforwardedfrom.c
15index 37157c7d4..ebf12ebbe 100644
16--- a/contrib/pmaixforwardedfrom/pmaixforwardedfrom.c
17+++ b/contrib/pmaixforwardedfrom/pmaixforwardedfrom.c
18@@ -109,6 +109,10 @@ CODESTARTparse
19 /* bump the message portion up by skipLen(23 or 5) characters to overwrite the "Message forwarded from
20 " or "From " with the hostname */
21 lenMsg -=skipLen;
22+ if(lenMsg < 2) {
23+ dbgprintf("not a AIX message forwarded from message has nothing after header\n");
24+ ABORT_FINALIZE(RS_RET_COULD_NOT_PARSE);
25+ }
26 memmove(p2parse, p2parse + skipLen, lenMsg);
27 *(p2parse + lenMsg) = '\n';
28 *(p2parse + lenMsg + 1) = '\0';
29@@ -120,6 +124,11 @@ really an AIX log, but has a similar preamble */
30 --lenMsg;
31 ++p2parse;
32 }
33+ if (lenMsg < 1) {
34+ dbgprintf("not a AIX message forwarded from message has nothing after colon "
35+ "or no colon at all\n");
36+ ABORT_FINALIZE(RS_RET_COULD_NOT_PARSE);
37+ }
38 if (lenMsg && *p2parse != ':') {
39 DBGPRINTF("not a AIX message forwarded from mangled log but similar enough that the preamble has "
40 "been removed\n");
41--
422.17.1
43
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog_8.1908.0.bb b/meta-oe/recipes-extended/rsyslog/rsyslog_8.1908.0.bb
index bd0dbc1a2..f9e44421d 100644
--- a/meta-oe/recipes-extended/rsyslog/rsyslog_8.1908.0.bb
+++ b/meta-oe/recipes-extended/rsyslog/rsyslog_8.1908.0.bb
@@ -24,6 +24,7 @@ SRC_URI = "http://www.rsyslog.com/download/files/download/rsyslog/${BPN}-${PV}.t
24 file://use-pkgconfig-to-check-libgcrypt.patch \ 24 file://use-pkgconfig-to-check-libgcrypt.patch \
25 file://run-ptest \ 25 file://run-ptest \
26 file://0001-Out-of-bounds-issue.patch \ 26 file://0001-Out-of-bounds-issue.patch \
27 file://0001-pmaixforwardedfrom-bugfix-potential-misadressing.patch \
27" 28"
28 29
29SRC_URI_append_libc-musl = " \ 30SRC_URI_append_libc-musl = " \