Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package gcc7 for openSUSE:Factory checked in 
at 2026-11-16 12:30:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gcc7 (Old)
 and      /work/SRC/openSUSE:Factory/.gcc7.new.1251 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gcc7"

Mon Nov 16 12:30:05 2026 rev:51 rq:1397850 version:7.5.0+r278197

Changes:
--------
--- /work/SRC/openSUSE:Factory/gcc7/gcc7.changes        2026-10-01 
16:46:40.616115003 +0200
+++ /work/SRC/openSUSE:Factory/.gcc7.new.1251/gcc7.changes      2026-11-16 
12:31:02.616209923 +0100
@@ -1,0 +2,8 @@
+Mon Nov  9 09:58:02 UTC 2026 - Richard Biener <[email protected]>
+
+- Add gcc7-cve-2026-114690.patch to fix buffer overrun in __gnu_parallel
+  search [bsc#1288775] (CVE-2026-114690)
+- Add gcc7-cve-2026-114691.patch to fix overflow in std::vector<bool>
+  constructors [bsc#1288774] (CVE-2026-114691)
+
+-------------------------------------------------------------------

New:
----
  gcc7-cve-2026-114690.patch
  gcc7-cve-2026-114691.patch

----------(New B)----------
  New:
- Add gcc7-cve-2026-114690.patch to fix buffer overrun in __gnu_parallel
  search [bsc#1288775] (CVE-2026-114690)
  New:  search [bsc#1288775] (CVE-2026-114690)
- Add gcc7-cve-2026-114691.patch to fix overflow in std::vector<bool>
  constructors [bsc#1288774] (CVE-2026-114691)
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cross-aarch64-gcc7.spec ++++++
--- /var/tmp/diff_new_pack.cFSS1p/_old  2026-11-16 12:31:06.042355020 +0100
+++ /var/tmp/diff_new_pack.cFSS1p/_new  2026-11-16 12:31:06.043355062 +0100
@@ -166,6 +166,8 @@
 Patch75:        gcc7-libsanitizer-scc.patch
 Patch76:        gcc7-pr127656.patch
 Patch77:        gcc7-pr113258.patch
+Patch78:        gcc7-cve-2026-114690.patch
+Patch79:        gcc7-cve-2026-114691.patch
 # A set of patches from the RH srpm
 Patch51:        gcc41-ppc32-retaddr.patch
 # Some patches taken from Debian
@@ -378,6 +380,8 @@
 %patch -P 75 -p1
 %patch -P 76 -p1
 %patch -P 77 -p1
+%patch -P 78 -p1
+%patch -P 79 -p1
 %patch -P 51
 %patch -P 60
 %patch -P 61

cross-arm-gcc7.spec: same change
cross-arm-none-gcc7-bootstrap.spec: same change
cross-arm-none-gcc7.spec: same change
cross-avr-gcc7-bootstrap.spec: same change
cross-avr-gcc7.spec: same change
cross-hppa-gcc7.spec: same change
cross-i386-gcc7.spec: same change
cross-m68k-gcc7.spec: same change
cross-mips-gcc7.spec: same change
cross-nvptx-gcc7.spec: same change
cross-ppc64-gcc7.spec: same change
cross-ppc64le-gcc7.spec: same change
cross-rx-gcc7-bootstrap.spec: same change
cross-rx-gcc7.spec: same change
cross-s390x-gcc7.spec: same change
cross-sparc-gcc7.spec: same change
cross-sparc64-gcc7.spec: same change
cross-x86_64-gcc7.spec: same change
gcc7-testresults.spec: same change
++++++ gcc7.spec ++++++
--- /var/tmp/diff_new_pack.cFSS1p/_old  2026-11-16 12:31:06.936392778 +0100
+++ /var/tmp/diff_new_pack.cFSS1p/_new  2026-11-16 12:31:06.939392904 +0100
@@ -346,6 +346,8 @@
 Patch75:        gcc7-libsanitizer-scc.patch
 Patch76:        gcc7-pr127656.patch
 Patch77:        gcc7-pr113258.patch
+Patch78:        gcc7-cve-2026-114690.patch
+Patch79:        gcc7-cve-2026-114691.patch
 # A set of patches from the RH srpm
 Patch51:        gcc41-ppc32-retaddr.patch
 # Some patches taken from Debian
@@ -1903,6 +1905,8 @@
 %patch -P 75 -p1
 %patch -P 76 -p1
 %patch -P 77 -p1
+%patch -P 78 -p1
+%patch -P 79 -p1
 %patch -P 51
 %patch -P 60
 %patch -P 61

++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.cFSS1p/_old  2026-11-16 12:31:07.022396392 +0100
+++ /var/tmp/diff_new_pack.cFSS1p/_new  2026-11-16 12:31:07.025396518 +0100
@@ -1,5 +1,5 @@
-mtime: 1790776997
-commit: 3c4452de3175b4fe98046772540c1dabd658f004e26a53ef2d8cca2d81c65d6e
+mtime: 1794223136
+commit: dbaf3addb23b58f7bde5ced6aff2a59f35adbc96ae5dc4cfc373c99c71eccb1b
 url: https://src.opensuse.org/gcc/gcc7.git
 revision: main
 

++++++ build.specials.obscpio ++++++

++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore      1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore      2026-11-09 12:18:56.000000000 +0100
@@ -0,0 +1 @@
+.osc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pre_checkin.sh new/pre_checkin.sh
--- old/pre_checkin.sh  1970-01-01 01:00:00.000000000 +0100
+++ new/pre_checkin.sh  2026-11-09 12:18:56.000000000 +0100
@@ -0,0 +1,31 @@
+#!/bin/bash
+# This script is called automatically during autobuild checkin.
+
+case $0 in
+  \./*)
+    here=$PWD
+    ;;
+  */*)
+    here=${0%/*}
+    ;;
+  *)
+    here=$PWD
+    ;;
+esac
+case ${here##*/} in
+  gcc*.*)
+    # Handle maintainance projects with .$REPO suffix
+    suffix=${here##*/}
+    suffix=${suffix%%\.*}
+    set ${suffix#gcc}
+    ;;
+  gcc-*)
+    suffix=${here##*/}
+    set ${suffix#*-}-
+    ;;
+  gcc[0-9]*)
+    suffix=${here##*/}
+    set ${suffix#gcc}
+    ;;
+esac
+. ${here}/change_spec

++++++ gcc.spec.in ++++++
--- /var/tmp/diff_new_pack.cFSS1p/_old  2026-11-16 12:31:07.268406730 +0100
+++ /var/tmp/diff_new_pack.cFSS1p/_new  2026-11-16 12:31:07.272406898 +0100
@@ -353,6 +353,8 @@
 Patch75:       gcc7-libsanitizer-scc.patch
 Patch76:       gcc7-pr127656.patch
 Patch77:       gcc7-pr113258.patch
+Patch78:       gcc7-cve-2026-114690.patch
+Patch79:       gcc7-cve-2026-114691.patch
 # A set of patches from the RH srpm
 Patch51:       gcc41-ppc32-retaddr.patch
 # Some patches taken from Debian
@@ -1177,6 +1179,8 @@
 %patch -P 75 -p1
 %patch -P 76 -p1
 %patch -P 77 -p1
+%patch -P 78 -p1
+%patch -P 79 -p1
 %patch -P 51
 %patch -P 60
 %patch -P 61

++++++ gcc7-cve-2026-114690.patch ++++++
>From 31366968a5b4a457ee37237317ab66a0cafc14d6 Mon Sep 17 00:00:00 2001
From: Richard Biener <[email protected]>
Date: Wed, 21 Oct 2026 18:14:33 +0100
Subject: [PATCH] libstdc++: Fix buffer overrun in __gnu_parallel search
 (CVE-2026-114690)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
To: [email protected]

From: Jonathan Wakely <[email protected]>

The libstdc++ Parallel Mode (enabled by _GLIBCXX_PARALLEL or by
including the relevant headers and calling the functionss explicitly)
uses the Knuth-Morris-Pratt search algorithm. A VLA is declared for the
borders, but it uses N elements not N+1, leading to an out-of-bounds
write in the parallel std::search.

libstdc++-v3/ChangeLog:

        * include/parallel/search.h (__search_template): Increase array
        size.

Reviewed-by: Tomasz Kamiński <[email protected]>

(cherry picked from commit c1f32b67510f6f9998deadaef5090b6663adb979)
---
 libstdc++-v3/include/parallel/search.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libstdc++-v3/include/parallel/search.h 
b/libstdc++-v3/include/parallel/search.h
index 6424a45b682..a215e0ead0c 100644
--- a/libstdc++-v3/include/parallel/search.h
+++ b/libstdc++-v3/include/parallel/search.h
@@ -111,7 +111,7 @@ namespace __gnu_parallel
        (1, std::min<_DifferenceType>(__input_length,
                                      __get_max_threads()));
 
-      _DifferenceType __advances[__pattern_length];
+      _DifferenceType __advances[__pattern_length + 1];
       __calc_borders(__begin2, __pattern_length, __advances);
 
 #     pragma omp parallel num_threads(__num_threads)

-- 
2.51.0


++++++ gcc7-cve-2026-114691.patch ++++++
>From dd2fe3ee5fdd4060ff40f2db955b2422cf8f8328 Mon Sep 17 00:00:00 2001
From: Jonathan Wakely <[email protected]>
Date: Mon, 9 Nov 2026 10:38:54 +0100
Subject: [PATCH] libstdc++: Fix overflow in std::vector<bool> constructors
 (CVE-2026-114691)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Some std::vector<bool> constructors pass a user-provided size (or a
distance derived from user-provided range) to the _S_nword function
which does addition to find the number of words (of type unsigned long)
that are needed for that number of bits. If the size is close to
SIZE_MAX the addition wraps to zero and the number of words needed is
incorrect.

This adds a new function for initializing from user-provided sizes which
checks against max_size() so that out-of-range values are rejected
before any call to _S_nword.

The new function rejects negative values as well as large ones. For an
invalid range the result of ranges::distance or std::distance could be a
very large negative value that would become smaller than max_size() when
converted to size_t. This detects some invalid inputs (last before
first) at minimal cost.

Backport changes for releases/gcc-7:
- Omit C++23 std::from_range constructor changes as ranges are not supported.
- Update C++98 vector(size_type, const bool&) constructor variant.
- Omit _GLIBCXX20_CONSTEXPR from _M_check_and_initialize.
- Guard <ranges> include in testsuite/23_containers/vector/bool/prX.cc
  with #if __cplusplus > 201703L so it passes on pre-C++20 standards.

libstdc++-v3/ChangeLog:

        * include/bits/stl_bvector.h (_M_check_and_initialize): New
        function.
        (vector(size_type, const bool&, const allocator_type&))
        (vector(size_type, const bool&)): Use new function instead of
        _M_initialize.
        (_M_initialize_dispatch, _M_initialize_range): Use new function
        instead of _M_initialize.
        (_M_initialize): Add debug assertion.
        * testsuite/23_containers/vector/bool/prX.cc: New test.

Reviewed-by: Tomasz Kamiński <[email protected]>
(cherry picked from commit 2fd8866591b5aea7098835f80ab7e176382175ae)
---
 libstdc++-v3/include/bits/stl_bvector.h       |  23 ++-
 .../23_containers/vector/bool/prX.cc          | 162 ++++++++++++++++++
 2 files changed, 180 insertions(+), 5 deletions(-)
 create mode 100644 libstdc++-v3/testsuite/23_containers/vector/bool/prX.cc

diff --git a/libstdc++-v3/include/bits/stl_bvector.h 
b/libstdc++-v3/include/bits/stl_bvector.h
index 78195c1295d..c1db4d4efcc 100644
--- a/libstdc++-v3/include/bits/stl_bvector.h
+++ b/libstdc++-v3/include/bits/stl_bvector.h
@@ -505,6 +505,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
          }
       }
 
+      // Caller must ensure the addition won't overflow.
       static size_t
       _S_nword(size_t __n)
       { return (__n + int(_S_word_bit) - 1) / int(_S_word_bit); }
@@ -594,7 +595,7 @@ template<typename _Alloc>
           const allocator_type& __a = allocator_type())
     : _Base(__a)
     {
-      _M_initialize(__n);
+      _M_check_and_initialize(__n);
       std::fill(this->_M_impl._M_start._M_p, this->_M_impl._M_end_addr(),
                __value ? ~0 : 0);
     }
@@ -604,7 +605,7 @@ template<typename _Alloc>
           const allocator_type& __a = allocator_type())
     : _Base(__a)
     {
-      _M_initialize(__n);
+      _M_check_and_initialize(__n);
       std::fill(this->_M_impl._M_start._M_p, this->_M_impl._M_end_addr(),
                __value ? ~0 : 0);
     }
@@ -1086,9 +1087,22 @@ template<typename _Alloc>
                       iterator(__q, 0));
     }
 
+      template<typename _SizeT>
+       void
+       _M_check_and_initialize(_SizeT __n)
+       {
+         if (__n > max_size() || __n < 0)
+           __throw_length_error(
+             __N("Cannot create std::vector<bool> larger than max_size()"));
+         _M_initialize(static_cast<size_type>(__n));
+       }
+
     void
     _M_initialize(size_type __n)
     {
+      // Caller must ensure this, to avoid overflow in _S_nword.
+      _GLIBCXX_DEBUG_ASSERT(__n <= (size_t)-_S_word_bit);
+
       if (__n)
        {
          _Bit_pointer __q = this->_M_allocate(__n);
@@ -1119,7 +1133,7 @@ template<typename _Alloc>
       void
       _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type)
       {
-       _M_initialize(static_cast<size_type>(__n));
+       _M_check_and_initialize(static_cast<size_type>(__n));
        std::fill(this->_M_impl._M_start._M_p, 
                  this->_M_impl._M_end_addr(), __x ? ~0 : 0);
       }
@@ -1145,8 +1159,7 @@ template<typename _Alloc>
       _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last,
                          std::forward_iterator_tag)
       {
-       const size_type __n = std::distance(__first, __last);
-       _M_initialize(__n);
+       _M_check_and_initialize(std::distance(__first, __last));
        std::copy(__first, __last, this->_M_impl._M_start);
       }
 
diff --git a/libstdc++-v3/testsuite/23_containers/vector/bool/prX.cc 
b/libstdc++-v3/testsuite/23_containers/vector/bool/prX.cc
new file mode 100644
index 00000000000..3dabac862c7
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/vector/bool/prX.cc
@@ -0,0 +1,162 @@
+// { dg-do run }
+
+#include <vector>
+#if __cplusplus > 201703L
+# include <ranges>
+#endif
+#include <stdexcept>
+#include <testsuite_hooks.h>
+
+static void
+test_n_element_ctor()
+{
+  try {
+    std::vector<bool> v(-15, true);
+    VERIFY(false);
+  } catch (const std::length_error&) {
+  }
+}
+
+static void
+test_n_element_ctor_dispatch()
+{
+  try {
+    std::vector<bool> v(-15, 1); // in C++98 this calls vector(Iter, Iter) ctor
+    VERIFY(false);
+  } catch (const std::length_error&) {
+  }
+}
+
+// A Cpp17RandomAccessIterator for which std::distance always returns an
+// impossibly large distance. This implements the Cpp17RandomAccessIterator
+// API but doesn't meet the semantic requirements.
+// For the test below, all that matters is that the huge value from
+// std::distance(first, last) causes std::length_error to be thrown.
+struct FakeIterator
+{
+  typedef std::random_access_iterator_tag iterator_category;
+  typedef bool value_type;
+  typedef std::size_t difference_type; // should be a signed type
+  typedef const bool* pointer;
+  typedef const bool& reference;
+
+  FakeIterator() : val(true) { }
+
+  reference operator*() const { return val; }
+  pointer   operator->() const { return &val; }
+  reference operator[](difference_type) const { return val; }
+
+  FakeIterator& operator++() { return *this; }
+  FakeIterator  operator++(int) { return *this; }
+  FakeIterator& operator--() { return *this; }
+  FakeIterator  operator--(int) { return *this; }
+
+  FakeIterator& operator+=(difference_type) { return *this; }
+  FakeIterator& operator-=(difference_type) { return *this; }
+
+  FakeIterator operator+(difference_type) const { return *this; }
+  FakeIterator operator-(difference_type) const { return *this; }
+
+  friend FakeIterator operator+(difference_type, FakeIterator i) { return i; }
+
+  // Return an impossibly large distance
+  difference_type operator-(FakeIterator) const { return (std::size_t)-8; }
+
+  // These are meaningless results but not actually used by this test.
+  bool operator==(const FakeIterator&) const { return false; }
+  bool operator!=(const FakeIterator&) const { return true; }
+  bool operator<(const FakeIterator&) const { return true; }
+  bool operator>(const FakeIterator&) const { return false; }
+  bool operator<=(const FakeIterator&) const { return true; }
+  bool operator>=(const FakeIterator&) const { return false; }
+
+private:
+  bool val;
+};
+
+#ifdef __cpp_lib_ranges
+// Wraps a std::random_access_iterator as a Cpp17RandomAccessIterator
+// except for having an integer-like class type as difference_type.
+// This one is _almost_ a real Cpp17RandomAccessIterator, except for the
+// difference_type. Again, we only care that the huge distance is
+// detected and std::length_error is thrown.
+class Iterator
+{
+  using View = std::ranges::iota_view<std::size_t, std::size_t>;
+  using ViewIter = std::ranges::iterator_t<View>;
+
+public:
+  using iterator_category = std::random_access_iterator_tag;
+  using value_type = bool;
+  using difference_type = std::iter_difference_t<ViewIter>;
+
+  Iterator() = default;
+
+  explicit Iterator(ViewIter iter) : iter(iter) { }
+
+  const bool& operator*() const { return val; }
+  const bool* operator->() const { return &val; }
+  const bool& operator[](difference_type n) const { return *(*this + n); }
+
+  Iterator& operator++() { ++iter; return *this; }
+  Iterator  operator++(int) { return Iterator(iter++); }
+  Iterator& operator--() { --iter; return *this; }
+  Iterator  operator--(int) { return Iterator(iter--); }
+
+  Iterator& operator+=(difference_type n) { iter += n; return *this; }
+  Iterator& operator-=(difference_type n) { iter -= n; return *this; }
+
+  Iterator operator+(difference_type n) const { return Iterator(iter + n); }
+  Iterator operator-(difference_type n) const { return Iterator(iter - n); }
+
+  friend Iterator operator+(difference_type n, Iterator i) { return i + n; }
+  difference_type operator-(Iterator i) const { return iter - i.iter; }
+
+  bool operator==(const Iterator& i) const { return iter == i.iter; }
+  auto operator<=>(const Iterator& i) const { return iter <=> i.iter; }
+
+private:
+  ViewIter iter = ViewIter();
+  bool val = true;
+};
+
+static_assert( std::random_access_iterator<Iterator> );
+#endif
+
+static void
+test_range_ctors()
+{
+  try {
+    FakeIterator x;
+    std::vector<bool> v(x, x);
+    VERIFY(false);
+  } catch (const std::length_error&) {
+  }
+
+#ifdef __cpp_lib_ranges
+  const std::size_t min = 0, max = -8;
+  auto i = std::views::iota(min, max);
+  try {
+    Iterator first(std::ranges::begin(i));
+    Iterator last(std::ranges::end(i));
+    std::vector<bool> v(first, last);
+    VERIFY(false);
+  } catch (const std::length_error&) {
+  }
+
+#ifdef __cpp_lib_containers_ranges
+  try {
+    std::vector<bool> v(std::from_range, i);
+    VERIFY(false);
+  } catch (const std::length_error&) {
+  }
+#endif
+#endif
+}
+
+int main()
+{
+  test_n_element_ctor();
+  test_n_element_ctor_dispatch();
+  test_range_ctors();
+}
-- 
2.51.0

Reply via email to