diff options
author | Leo Famulari <leo@famulari.name> | 2017-08-18 16:33:04 -0400 |
---|---|---|
committer | Leo Famulari <leo@famulari.name> | 2017-08-18 17:24:47 -0400 |
commit | d9f15d7e48bc7c361b8a88849542d9f5d7442126 (patch) | |
tree | 97996630ff568474c4d32bd426292bb8ca87fb9b /gnu/packages | |
parent | 8c0c0c4defed40f4cb3139e0a887f9ed19915b1b (diff) | |
download | patches-d9f15d7e48bc7c361b8a88849542d9f5d7442126.tar patches-d9f15d7e48bc7c361b8a88849542d9f5d7442126.tar.gz |
gnu: newsbeuter: Fix CVE-2017-12904.
* gnu/packages/patches/newsbeuter-CVE-2017-12904.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/syndication.scm (newsbeuter)[source]: Use it.
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/patches/newsbeuter-CVE-2017-12904.patch | 34 | ||||
-rw-r--r-- | gnu/packages/syndication.scm | 2 |
2 files changed, 36 insertions, 0 deletions
diff --git a/gnu/packages/patches/newsbeuter-CVE-2017-12904.patch b/gnu/packages/patches/newsbeuter-CVE-2017-12904.patch new file mode 100644 index 0000000000..8e90502469 --- /dev/null +++ b/gnu/packages/patches/newsbeuter-CVE-2017-12904.patch @@ -0,0 +1,34 @@ +Fix CVE-2017-12904: + +https://github.com/akrennmair/newsbeuter/issues/591 +https://cve.mitre.org/cgi-bin/cvename.cgi?name=2017-12904 + +Patch copied from the Debian package of newsbeuter, version 2.9-5+deb9u1. + +Adapted from upstream source repository: + +https://github.com/akrennmair/newsbeuter/commit/96e9506ae9e252c548665152d1b8968297128307 + +Description: Fix a RCE vulnerability in the bookmark command + Newsbeuter didn't properly escape the title and description fields before + passing them to the bookmarking program which could lead to remote code + execution using the shells command substitution functionality (e.g. "$()", ``, + etc) + +Origin: upstream, https://github.com/akrennmair/newsbeuter/commit/96e9506ae9e252c548665152d1b8968297128307 +Last-Update: 2017-08-18 + +--- newsbeuter-2.9.orig/src/controller.cpp ++++ newsbeuter-2.9/src/controller.cpp +@@ -1274,9 +1274,10 @@ std::string controller::bookmark(const s + std::string bookmark_cmd = cfg.get_configvalue("bookmark-cmd"); + bool is_interactive = cfg.get_configvalue_as_bool("bookmark-interactive"); + if (bookmark_cmd.length() > 0) { +- std::string cmdline = utils::strprintf("%s '%s' %s %s", ++ std::string cmdline = utils::strprintf("%s '%s' '%s' '%s'", + bookmark_cmd.c_str(), utils::replace_all(url,"'", "%27").c_str(), +- stfl::quote(title).c_str(), stfl::quote(description).c_str()); ++ utils::replace_all(title,"'", "%27").c_str(), ++ utils::replace_all(description,"'", "%27").c_str()); + + LOG(LOG_DEBUG, "controller::bookmark: cmd = %s", cmdline.c_str()); diff --git a/gnu/packages/syndication.scm b/gnu/packages/syndication.scm index f434006656..80c45c396c 100644 --- a/gnu/packages/syndication.scm +++ b/gnu/packages/syndication.scm @@ -18,6 +18,7 @@ #:use-module (guix download) #:use-module (guix packages) #:use-module (guix build-system gnu) + #:use-module (gnu packages) #:use-module (gnu packages curl) #:use-module (gnu packages databases) #:use-module (gnu packages gettext) @@ -37,6 +38,7 @@ (method url-fetch) (uri (string-append "https://newsbeuter.org/downloads/newsbeuter-" version ".tar.gz")) + (patches (search-patches "newsbeuter-CVE-2017-12904.patch")) (sha256 (base32 "1j1x0hgwxz11dckk81ncalgylj5y5fgw5bcmp9qb5hq9kc0vza3l")))) |