* [gentoo-commits] repo/gentoo:master commit in: app-arch/sharutils/, app-arch/sharutils/files/
@ 2019-03-13 12:03 Andreas K. Hüttel
0 siblings, 0 replies; 2+ messages in thread
From: Andreas K. Hüttel @ 2019-03-13 12:03 UTC (permalink / raw
To: gentoo-commits
commit: 648bdf9134d87d5d6ca086b742964b77c3da87d8
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 13 12:02:46 2019 +0000
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Wed Mar 13 12:02:46 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=648bdf91
app-arch/sharutils: Add patch for CVE-2018-1000097
Bug: https://bugs.gentoo.org/652686
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
.../files/sharutils-4.15.2-CVE-2018-1000097.patch | 16 ++++++++++++++++
...harutils-4.15.2.ebuild => sharutils-4.15.2-r1.ebuild} | 1 +
2 files changed, 17 insertions(+)
diff --git a/app-arch/sharutils/files/sharutils-4.15.2-CVE-2018-1000097.patch b/app-arch/sharutils/files/sharutils-4.15.2-CVE-2018-1000097.patch
new file mode 100644
index 00000000000..f61662040b6
--- /dev/null
+++ b/app-arch/sharutils/files/sharutils-4.15.2-CVE-2018-1000097.patch
@@ -0,0 +1,16 @@
+From: Petr Pisar
+Subject: Fix CVE-2018-1000097, heap buffer overflow in unshar
+Bug-Debian: https://bugs.debian.org/893525
+X-Debian-version: 1:4.15.2-3
+
+--- a/src/unshar.c
++++ b/src/unshar.c
+@@ -240,7 +240,7 @@
+ off_t position = ftello (file);
+
+ /* Read next line, fail if no more and no previous process. */
+- if (!fgets (rw_buffer, BUFSIZ, file))
++ if (!fgets (rw_buffer, rw_base_size, file))
+ {
+ if (!start)
+ error (0, 0, _("Found no shell commands in %s"), name);
diff --git a/app-arch/sharutils/sharutils-4.15.2.ebuild b/app-arch/sharutils/sharutils-4.15.2-r1.ebuild
similarity index 94%
rename from app-arch/sharutils/sharutils-4.15.2.ebuild
rename to app-arch/sharutils/sharutils-4.15.2-r1.ebuild
index ab637e3cd24..2a7873196c5 100644
--- a/app-arch/sharutils/sharutils-4.15.2.ebuild
+++ b/app-arch/sharutils/sharutils-4.15.2-r1.ebuild
@@ -25,6 +25,7 @@ src_prepare() {
default
epatch "${FILESDIR}/sharutils-4.15.2-glibc228.patch"
+ epatch "${FILESDIR}/sharutils-4.15.2-CVE-2018-1000097.patch"
# Upstream is aware but thinks this isn't a bug/problem in sharutils itself
# See http://lists.gnu.org/archive/html/bug-gnu-utils/2013-10/msg00011.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-arch/sharutils/, app-arch/sharutils/files/
@ 2020-05-02 12:18 Sergei Trofimovich
0 siblings, 0 replies; 2+ messages in thread
From: Sergei Trofimovich @ 2020-05-02 12:18 UTC (permalink / raw
To: gentoo-commits
commit: 2fc78c6750cb4d92e6411b71f47218ea51335763
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat May 2 12:15:03 2020 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat May 2 12:18:52 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2fc78c67
app-arch/sharutils: tweak for gcc-10, bug #706256
Reported-by: Toralf Förster
Closes: https://bugs.gentoo.org/706256
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
.../sharutils/files/sharutils-4.15.2-gcc-10.patch | 48 ++++++++++++++++++++++
app-arch/sharutils/sharutils-4.15.2-r1.ebuild | 1 +
2 files changed, 49 insertions(+)
diff --git a/app-arch/sharutils/files/sharutils-4.15.2-gcc-10.patch b/app-arch/sharutils/files/sharutils-4.15.2-gcc-10.patch
new file mode 100644
index 00000000000..4a0c02f5ba9
--- /dev/null
+++ b/app-arch/sharutils/files/sharutils-4.15.2-gcc-10.patch
@@ -0,0 +1,48 @@
+https://bugs.gentoo.org/706256
+
+Fix build failure on gcc-10/-fno-common.
+
+--- a/src/shar-opts.h
++++ b/src/shar-opts.h
+@@ -352,7 +352,7 @@ extern "C" {
+ * global exported definitions
+ */
+ #include "local.h"
+-char const * const program_name;
++extern char const * const program_name;
+
+ extern bool initialization_done;
+ extern int optidx;
+--- a/src/unshar-opts.h
++++ b/src/unshar-opts.h
+@@ -192,7 +192,7 @@ extern "C" {
+ extern size_t separator_str_len;
+
+ #include "local.h"
+-char const * const program_name;
++extern char const * const program_name;
+
+
+ /* * * * * *
+--- a/src/uudecode-opts.h
++++ b/src/uudecode-opts.h
+@@ -170,7 +170,7 @@ extern "C" {
+ * global exported definitions
+ */
+ #include "local.h"
+-char const * const program_name;
++extern char const * const program_name;
+
+
+ /* * * * * *
+--- a/src/uuencode-opts.h
++++ b/src/uuencode-opts.h
+@@ -166,7 +166,7 @@ extern "C" {
+ * global exported definitions
+ */
+ #include "local.h"
+-char const * const program_name;
++extern char const * const program_name;
+
+
+ /* * * * * *
diff --git a/app-arch/sharutils/sharutils-4.15.2-r1.ebuild b/app-arch/sharutils/sharutils-4.15.2-r1.ebuild
index dc4356b4ead..00e6532922b 100644
--- a/app-arch/sharutils/sharutils-4.15.2-r1.ebuild
+++ b/app-arch/sharutils/sharutils-4.15.2-r1.ebuild
@@ -26,6 +26,7 @@ src_prepare() {
epatch "${FILESDIR}/sharutils-4.15.2-glibc228.patch"
epatch "${FILESDIR}/sharutils-4.15.2-CVE-2018-1000097.patch"
+ epatch "${FILESDIR}/sharutils-4.15.2-gcc-10.patch"
# Upstream is aware but thinks this isn't a bug/problem in sharutils itself
# See http://lists.gnu.org/archive/html/bug-gnu-utils/2013-10/msg00011.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-02 12:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-02 12:18 [gentoo-commits] repo/gentoo:master commit in: app-arch/sharutils/, app-arch/sharutils/files/ Sergei Trofimovich
-- strict thread matches above, loose matches on Subject: below --
2019-03-13 12:03 Andreas K. Hüttel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox