rsyslog: fix CVE-2017-12588
PATCH 1/1 rsyslog: fix CVE-2017-12588
From: Chen Qi <[email protected]>
Backport a patch to fix CVE-2017-12588.
The zmq3 input and output modules in rsyslog before 8.28.0 interpreted description fields as format strings, possibly allowing a format string attack with unspecified impact.
Reference: https://nvd.nist.gov/vuln/detail/CVE-2017-12588
CVE: CVE-2017-12588
--- .../rsyslog/rsyslog/CVE-2017-12588.patch | 40 ++++++++++++++++++++++ meta-oe/recipes-extended/rsyslog/rsyslog_8.22.0.bb | 1 + 2 files changed, 41 insertions(+) create mode 100644 meta-oe/recipes-extended/rsyslog/rsyslog/CVE-2017-12588.patch
meta-oe/recipes-extended/rsyslog/rsyslog/CVE-2017-12588.patch new file +40 -0
@@ -0,0 +1,40 @@ +From 6bc4aa975a83abed43d734299ce76cd9e1a14aec Mon Sep 17 00:00:00 2001 +From: Thomas Deutschmann <[email protected]> +Date: Wed, 17 May 2017 23:05:24 +0200 +Subject: [PATCH] imzmq3: Fix building with -Werror=format-security + +Reference: https://nvd.nist.gov/vuln/detail/CVE-2017-12588 + +CVE: 2017-12588 + +Upstream-Status: Backport +Signed-off-by: Chen Qi <[email protected]> +--- + contrib/imzmq3/imzmq3.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/contrib/imzmq3/imzmq3.c b/contrib/imzmq3/imzmq3.c +index 9ca17871..d32dcbc2 100644 +--- a/contrib/imzmq3/imzmq3.c ++++ b/contrib/imzmq3/imzmq3.c +@@ -403,7 +403,7 @@ static rsRetVal createSocket(instanceConf_t* info, void** sock) { + + /* Do the bind/connect... */ + if (info->action==ACTION_CONNECT) { +- rv = zsocket_connect(*sock, info->description); ++ rv = zsocket_connect(*sock, "%s", info->description); + if (rv == -1) { + errmsg.LogError(0, + RS_RET_INVALID_PARAMS, +@@ -413,7 +413,7 @@ static rsRetVal createSocket(instanceConf_t* info, void** sock) { + } + DBGPRINTF("imzmq3: connect for %s successful\n",info->description); + } else { +- rv = zsocket_bind(*sock, info->description); ++ rv = zsocket_bind(*sock, "%s", info->description); + if (rv == -1) { + errmsg.LogError(0, + RS_RET_INVALID_PARAMS, +-- +2.13.0 +
meta-oe/recipes-extended/rsyslog/rsyslog_8.22.0.bb +1 -0
@@ -24,6 +24,7 @@ SRC_URI = "http://www.rsyslog.com/download/files/download/rsyslog/${BPN}-${PV}.t file://use-pkgconfig-to-check-libgcrypt.patch \ file://run-ptest \ file://rsyslog-fix-ptest-not-finish.patch \ + file://CVE-2017-12588.patch \ " SRC_URI_append_libc-musl = " \
Signature · 1 line
1.9.1
Quoted 71 lines · On 2017-08-17 06:51 AM, [email protected] wrote:
From: Chen Qi <[email protected]>
Backport a patch to fix CVE-2017-12588.
The zmq3 input and output modules in rsyslog before 8.28.0 interpreted description fields as format strings, possibly allowing a format string attack with unspecified impact.
Reference: https://nvd.nist.gov/vuln/detail/CVE-2017-12588
CVE: CVE-2017-12588
Signed-off-by Chen Qi <[email protected]>--- .../rsyslog/rsyslog/CVE-2017-12588.patch | 40 ++++++++++++++++++++++ meta-oe/recipes-extended/rsyslog/rsyslog_8.22.0.bb | 1 + 2 files changed, 41 insertions(+)create mode 100644
meta-oe/recipes-extended/rsyslog/rsyslog/CVE-2017-12588.patchmeta-oe/recipes-extended/rsyslog/rsyslog/CVE-2017-12588.patch new file +40
-0@@ -0,0 +1,40 @@ +From 6bc4aa975a83abed43d734299ce76cd9e1a14aec Mon Sep 17 00:00:00 2001 +From: Thomas Deutschmann <[email protected]> +Date: Wed, 17 May 2017 23:05:24 +0200 +Subject: [PATCH] imzmq3: Fix building with -Werror=format-security + +Reference: https://nvd.nist.gov/vuln/detail/CVE-2017-12588 + +CVE: 2017-12588 + +Upstream-Status: Backport +Signed-off-by: Chen Qi <[email protected]> +--- + contrib/imzmq3/imzmq3.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/contrib/imzmq3/imzmq3.c b/contrib/imzmq3/imzmq3.c +index 9ca17871..d32dcbc2 100644 +--- a/contrib/imzmq3/imzmq3.c ++++ b/contrib/imzmq3/imzmq3.c +@@ -403,7 +403,7 @@ static rsRetVal createSocket(instanceConf_t* info, void** sock) { + + /* Do the bind/connect... */ + if (info->action==ACTION_CONNECT) { +- rv = zsocket_connect(*sock, info->description); ++ rv = zsocket_connect(*sock, "%s", info->description); + if (rv == -1) { + errmsg.LogError(0, + RS_RET_INVALID_PARAMS, +@@ -413,7 +413,7 @@ static rsRetVal createSocket(instanceConf_t* info, void** sock) { + } + DBGPRINTF("imzmq3: connect for %s successful\n",info->description); + } else { +- rv = zsocket_bind(*sock, info->description); ++ rv = zsocket_bind(*sock, "%s", info->description); + if (rv == -1) { + errmsg.LogError(0, + RS_RET_INVALID_PARAMS, +-- +2.13.0 +meta-oe/recipes-extended/rsyslog/rsyslog_8.22.0.bb +0
-0
meta-oe/recipes-extended/rsyslog/rsyslog_8.22.0.bb SRC_URI = "http://www.rsyslog.com/download/files/download/rsyslog/${BPN}-${PV}.t · line 30
Quoted 7 lines
meta-oe/recipes-extended/rsyslog/rsyslog_8.22.0.bb +1
-0@@ -24,6 +24,7 @@ SRC_URI = "http://www.rsyslog.com/download/files/download/rsyslog/${BPN}-${PV}.t file://use-pkgconfig-to-check-libgcrypt.patch \ file://run-ptest \ file://rsyslog-fix-ptest-not-finish.patch \ + file://CVE-2017-12588.patch \ " SRC_URI_append_libc-musl = " \
Better to just upgrade to 8.25. It was released in February so it should be well tested.
Signature · 2 lines
# Randy MacLeod. SMTS, Linux, Wind River Direct: 613.963.1350 | 350 Terry Fox Drive, Suite 200, Ottawa, ON, Canada, K2K 2W5
Quoted 80 lines · Randy MacLeod
Quoted 79 lines · On 2017-08-17 06:51 AM, [email protected] wrote:
From: Chen Qi <[email protected]>
Backport a patch to fix CVE-2017-12588.
The zmq3 input and output modules in rsyslog before 8.28.0 interpreted description fields as format strings, possibly allowing a format string attack with unspecified impact.
Reference: https://nvd.nist.gov/vuln/detail/CVE-2017-12588
CVE: CVE-2017-12588
Signed-off-by Chen Qi <[email protected]>--- .../rsyslog/rsyslog/CVE-2017-12588.patch | 40 ++++++++++++++++++++++ meta-oe/recipes-extended/rsyslog/rsyslog_8.22.0.bb | 1 + 2 files changed, 41 insertions(+)create mode 100644
meta-oe/recipes-extended/rsyslog/rsyslog/CVE-2017-12588.patchmeta-oe/recipes-extended/rsyslog/rsyslog/CVE-2017-12588.patch new file +20
-0@@ -0,0 +1,40 @@ +From 6bc4aa975a83abed43d734299ce76cd9e1a14aec Mon Sep 17 00:00:00 2001 +From: Thomas Deutschmann <[email protected]> +Date: Wed, 17 May 2017 23:05:24 +0200 +Subject: [PATCH] imzmq3: Fix building with -Werror=format-security + +Reference: https://nvd.nist.gov/vuln/detail/CVE-2017-12588 + +CVE: 2017-12588 + +Upstream-Status: Backport +Signed-off-by: Chen Qi <[email protected]> +--- + contrib/imzmq3/imzmq3.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/contrib/imzmq3/imzmq3.c b/contrib/imzmq3/imzmq3.c +index 9ca17871..d32dcbc2 100644 +--- a/contrib/imzmq3/imzmq3.c ++++ b/contrib/imzmq3/imzmq3.c +@@ -403,7 +403,7 @@ static rsRetVal createSocket(instanceConf_t*info, void** sock) {
meta-oe/recipes-extended/rsyslog/rsyslog/CVE-2017-12588.patch new file +9
-0+ + /* Do the bind/connect... */ + if (info->action==ACTION_CONNECT) { +- rv = zsocket_connect(*sock, info->description); ++ rv = zsocket_connect(*sock, "%s", info->description); + if (rv == -1) { + errmsg.LogError(0, + RS_RET_INVALID_PARAMS, +@@ -413,7 +413,7 @@ static rsRetVal createSocket(instanceConf_t*info, void** sock) {
meta-oe/recipes-extended/rsyslog/rsyslog/CVE-2017-12588.patch new file +2
-0+ } + DBGPRINTF("imzmq3: connect for %ssuccessful\n",info->description);
meta-oe/recipes-extended/rsyslog/rsyslog/CVE-2017-12588.patch new file +9
-0+ } else { +- rv = zsocket_bind(*sock, info->description); ++ rv = zsocket_bind(*sock, "%s", info->description); + if (rv == -1) { + errmsg.LogError(0, + RS_RET_INVALID_PARAMS, +-- +2.13.0 +meta-oe/recipes-extended/rsyslog/rsyslog_8.22.0.bb +0
-0@@ -24,6 +24,7 @@ SRC_URI ="http://www.rsyslog.com/download/files/download/rsyslog/${BPN}-${PV}.t
file://use-pkgconfig-to-check-libgcrypt.patch \ file://run-ptest \ file://rsyslog-fix-ptest-not-finish.patch \
Quoted 9 lines
Quoted 4 lines
+ file://CVE-2017-12588.patch \
"
SRC_URI_append_libc-musl = " \Better to just upgrade to 8.25. It was released in February so it should be well tested.
Oops, I mean 8.29, released 10 days ago:
https://github.com/rsyslog/rsyslog/releases
/me updates Wikipedia...
Signature · 2 lines
# Randy MacLeod. SMTS, Linux, Wind River Direct: 613.963.1350 | 350 Terry Fox Drive, Suite 200, Ottawa, ON, Canada, K2K 2W5