diff options
| author | Trevor Gamblin <trevor.gamblin@windriver.com> | 2019-10-15 11:45:32 -0700 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2019-10-17 05:53:25 -0700 |
| commit | c50a0cd12e929c097380693c9ce65c3563b78958 (patch) | |
| tree | ccc4e9032da3db83b08050e36554741e69e80807 | |
| parent | 02fa65c8e953b1ffd4e0fc48276319403f87dae3 (diff) | |
| download | meta-openembedded-c50a0cd12e929c097380693c9ce65c3563b78958.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>
| -rw-r--r-- | meta-oe/recipes-extended/rsyslog/rsyslog/0001-pmaixforwardedfrom-bugfix-potential-misadressing.patch | 43 | ||||
| -rw-r--r-- | meta-oe/recipes-extended/rsyslog/rsyslog_8.1908.0.bb | 1 |
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 0000000000..0b32766a59 --- /dev/null +++ b/meta-oe/recipes-extended/rsyslog/rsyslog/0001-pmaixforwardedfrom-bugfix-potential-misadressing.patch | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | From 10549ba915556c557b22b3dac7e4cb73ad22d3d8 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Rainer Gerhards <rgerhards@adiscon.com> | ||
| 3 | Date: Fri, 27 Sep 2019 13:36:02 +0200 | ||
| 4 | Subject: [PATCH] pmaixforwardedfrom bugfix: potential misadressing | ||
| 5 | |||
| 6 | --- | ||
| 7 | contrib/pmaixforwardedfrom/pmaixforwardedfrom.c | 9 +++++++++ | ||
| 8 | 1 file changed, 9 insertions(+) | ||
| 9 | |||
| 10 | Upstream-Status: Backport [https://github.com/rsyslog/rsyslog/pull/3884] | ||
| 11 | CVE: CVE-2019-17041 | ||
| 12 | Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> | ||
| 13 | |||
| 14 | diff --git a/contrib/pmaixforwardedfrom/pmaixforwardedfrom.c b/contrib/pmaixforwardedfrom/pmaixforwardedfrom.c | ||
| 15 | index 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 | -- | ||
| 42 | 2.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 bd0dbc1a2d..f9e44421df 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 | ||
| 29 | SRC_URI_append_libc-musl = " \ | 30 | SRC_URI_append_libc-musl = " \ |
