From d3d51173a5a95534fea7fdd450e79227f2312a58 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 4 Sep 2019 10:18:31 +0100 Subject: [PATCH 1/3] NVR bump in order to allow rebuilding against latest version of gcc. --- annobin.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/annobin.spec b/annobin.spec index 8a28543..d3eae62 100644 --- a/annobin.spec +++ b/annobin.spec @@ -2,7 +2,7 @@ Name: annobin Summary: Binary annotation plugin for GCC Version: 8.78 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3+ URL: https://fedoraproject.org/wiki/Toolchain/Watermark @@ -220,6 +220,9 @@ fi #--------------------------------------------------------------------------------- %changelog +* Wed Sep 04 2019 Nick Clifton - 8.78-2 +- NVR bump in order to allow rebuilding against latest version of gcc. + * Tue Aug 06 2019 Nick Clifton - 8.78-1 - Fix a memory allocation error in the annobin plugin. (#1737306) From 37c50d87ceecd5dba4bd87824d1def575e88e12a Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Mon, 30 Mar 2020 17:05:46 +0100 Subject: [PATCH 2/3] Annocheck: Fix a division by zero error when parsing GO binaries. Resolves: #1818863 --- annobin-divide-by-zero.patch | 16 ++++++++++++++++ annobin.spec | 7 +++++-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 annobin-divide-by-zero.patch diff --git a/annobin-divide-by-zero.patch b/annobin-divide-by-zero.patch new file mode 100644 index 0000000..14ee440 --- /dev/null +++ b/annobin-divide-by-zero.patch @@ -0,0 +1,16 @@ +diff -rup annobin.orig/annocheck/hardened.c annobin-8.78/annocheck/hardened.c +--- annobin.orig/annocheck/hardened.c 2020-03-30 17:00:15.839126957 +0100 ++++ annobin-8.78/annocheck/hardened.c 2020-03-30 17:00:55.219802988 +0100 +@@ -1246,6 +1246,12 @@ static bool + check_dynamic_section (annocheck_data * data, + annocheck_section * sec) + { ++ if (sec->shdr.sh_size == 0 || sec->shdr.sh_entsize == 0) ++ { ++ einfo (VERBOSE, "%s: WARN: Dynamic section %s is empty - ignoring", data->filename, sec->secname); ++ return true; ++ } ++ + size_t num_entries = sec->shdr.sh_size / sec->shdr.sh_entsize; + + if (tests[TEST_DYNAMIC].num_pass == 0) diff --git a/annobin.spec b/annobin.spec index d3eae62..34ebb6b 100644 --- a/annobin.spec +++ b/annobin.spec @@ -2,7 +2,7 @@ Name: annobin Summary: Binary annotation plugin for GCC Version: 8.78 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv3+ URL: https://fedoraproject.org/wiki/Toolchain/Watermark @@ -40,7 +40,7 @@ Source: https://nickc.fedorapeople.org/annobin-%{version}.tar.xz # For the latest sources use: git clone git://sourceware.org/git/annobin.git # Insert patches here, if needed. -# Patch01: annobin-xxx.patch +Patch01: annobin-divide-by-zero.patch #--------------------------------------------------------------------------------- @@ -220,6 +220,9 @@ fi #--------------------------------------------------------------------------------- %changelog +* Mon Mar 30 2020 Nick Clifton - 8.78-3 +- Annocheck: Fix a division by zero error when parsing GO binaries. (#1818863) + * Wed Sep 04 2019 Nick Clifton - 8.78-2 - NVR bump in order to allow rebuilding against latest version of gcc. From 34820610feb6bfe99a9854445e1a91ba8f84453c Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 9 Apr 2020 11:19:20 +0100 Subject: [PATCH 3/3] NVR bump to allow rebuild against new gcc --- annobin.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/annobin.spec b/annobin.spec index 34ebb6b..8cceedc 100644 --- a/annobin.spec +++ b/annobin.spec @@ -2,7 +2,7 @@ Name: annobin Summary: Binary annotation plugin for GCC Version: 8.78 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv3+ URL: https://fedoraproject.org/wiki/Toolchain/Watermark @@ -220,6 +220,9 @@ fi #--------------------------------------------------------------------------------- %changelog +* Thu Apr 09 2020 Nick Clifton - 8.78-4 +- NVR bump to allow rebuild against new gcc. + * Mon Mar 30 2020 Nick Clifton - 8.78-3 - Annocheck: Fix a division by zero error when parsing GO binaries. (#1818863)