Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package abseil-cpp for openSUSE:Factory 
checked in at 2025-01-28 14:58:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/abseil-cpp (Old)
 and      /work/SRC/openSUSE:Factory/.abseil-cpp.new.2316 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "abseil-cpp"

Tue Jan 28 14:58:10 2025 rev:42 rq:1240386 version:20240722.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/abseil-cpp/abseil-cpp.changes    2025-01-16 
18:31:18.722967444 +0100
+++ /work/SRC/openSUSE:Factory/.abseil-cpp.new.2316/abseil-cpp.changes  
2025-01-28 14:58:26.436219953 +0100
@@ -1,0 +2,6 @@
+Sun Jan 26 18:31:46 UTC 2025 - Andreas Stieger <[email protected]>
+
+- update to 20240722.1 (boo#1236438)
+  * potential integer overflow in hash container create/resize
+
+-------------------------------------------------------------------

Old:
----
  abseil-cpp-20240722.0.tar.gz

New:
----
  abseil-cpp-20240722.1.tar.gz

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

Other differences:
------------------
++++++ abseil-cpp.spec ++++++
--- /var/tmp/diff_new_pack.Pfi1eK/_old  2025-01-28 14:58:26.976242321 +0100
+++ /var/tmp/diff_new_pack.Pfi1eK/_new  2025-01-28 14:58:26.976242321 +0100
@@ -2,7 +2,7 @@
 # spec file for package abseil-cpp
 #
 # Copyright (c) 2024 SUSE LLC
-# Copyright (c) 2024 Andreas Stieger <[email protected]>
+# Copyright (c) 2025 Andreas Stieger <[email protected]>
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -23,7 +23,7 @@
 %global with_gcc 7
 %endif
 Name:           abseil-cpp
-Version:        20240722.0
+Version:        20240722.1
 Release:        0
 Summary:        C++11 libraries which augment the C++ stdlib
 License:        Apache-2.0

++++++ abseil-cpp-20240722.0.tar.gz -> abseil-cpp-20240722.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/abseil-cpp-20240722.0/MODULE.bazel 
new/abseil-cpp-20240722.1/MODULE.bazel
--- old/abseil-cpp-20240722.0/MODULE.bazel      2024-08-01 20:05:11.000000000 
+0200
+++ new/abseil-cpp-20240722.1/MODULE.bazel      2025-01-23 15:51:12.000000000 
+0100
@@ -16,7 +16,7 @@
 
 module(
     name = "abseil-cpp",
-    version = "20240722.0",
+    version = "20240722.1",
     compatibility_level = 1,
 )
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/abseil-cpp-20240722.0/absl/base/config.h 
new/abseil-cpp-20240722.1/absl/base/config.h
--- old/abseil-cpp-20240722.0/absl/base/config.h        2024-08-01 
20:05:11.000000000 +0200
+++ new/abseil-cpp-20240722.1/absl/base/config.h        2025-01-23 
15:51:12.000000000 +0100
@@ -118,7 +118,7 @@
 // LTS releases can be obtained from
 // https://github.com/abseil/abseil-cpp/releases.
 #define ABSL_LTS_RELEASE_VERSION 20240722
-#define ABSL_LTS_RELEASE_PATCH_LEVEL 0
+#define ABSL_LTS_RELEASE_PATCH_LEVEL 1
 
 // Helper macro to convert a CPP variable to a string literal.
 #define ABSL_INTERNAL_DO_TOKEN_STR(x) #x
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/abseil-cpp-20240722.0/absl/container/internal/raw_hash_set.h 
new/abseil-cpp-20240722.1/absl/container/internal/raw_hash_set.h
--- old/abseil-cpp-20240722.0/absl/container/internal/raw_hash_set.h    
2024-08-01 20:05:11.000000000 +0200
+++ new/abseil-cpp-20240722.1/absl/container/internal/raw_hash_set.h    
2025-01-23 15:51:12.000000000 +0100
@@ -1208,6 +1208,9 @@
   // Given the capacity of a table, computes the total size of the backing
   // array.
   size_t alloc_size(size_t slot_size) const {
+    ABSL_HARDENING_ASSERT(
+        slot_size <=
+        ((std::numeric_limits<size_t>::max)() - slot_offset_) / capacity_);
     return slot_offset_ + capacity_ * slot_size;
   }
 
@@ -1500,6 +1503,12 @@
   return n ? ~size_t{} >> countl_zero(n) : 1;
 }
 
+template <size_t kSlotSize>
+size_t MaxValidCapacity() {
+  return NormalizeCapacity((std::numeric_limits<size_t>::max)() / 4 /
+                           kSlotSize);
+}
+
 // General notes on capacity/growth methods below:
 // - We use 7/8th as maximum load factor. For 16-wide groups, that gives an
 //   average of two empty slots per group.
@@ -2614,6 +2623,8 @@
       : settings_(CommonFields::CreateDefault<SooEnabled()>(), hash, eq,
                   alloc) {
     if (bucket_count > (SooEnabled() ? SooCapacity() : 0)) {
+      ABSL_RAW_CHECK(bucket_count <= MaxValidCapacity<sizeof(slot_type)>(),
+                     "Hash table size overflow");
       resize(NormalizeCapacity(bucket_count));
     }
   }
@@ -2871,7 +2882,9 @@
     ABSL_ASSUME(!kEnabled || cap >= kCapacity);
     return cap;
   }
-  size_t max_size() const { return (std::numeric_limits<size_t>::max)(); }
+  size_t max_size() const {
+    return CapacityToGrowth(MaxValidCapacity<sizeof(slot_type)>());
+  }
 
   ABSL_ATTRIBUTE_REINITIALIZES void clear() {
     // Iterating over this container is O(bucket_count()). When bucket_count()
@@ -3260,6 +3273,8 @@
     auto m = NormalizeCapacity(n | GrowthToLowerboundCapacity(size()));
     // n == 0 unconditionally rehashes as per the standard.
     if (n == 0 || m > cap) {
+      ABSL_RAW_CHECK(m <= MaxValidCapacity<sizeof(slot_type)>(),
+                     "Hash table size overflow");
       resize(m);
 
       // This is after resize, to ensure that we have completed the allocation
@@ -3272,6 +3287,7 @@
     const size_t max_size_before_growth =
         is_soo() ? SooCapacity() : size() + growth_left();
     if (n > max_size_before_growth) {
+      ABSL_RAW_CHECK(n <= max_size(), "Hash table size overflow");
       size_t m = GrowthToLowerboundCapacity(n);
       resize(NormalizeCapacity(m));
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/abseil-cpp-20240722.0/absl/container/internal/raw_hash_set_test.cc 
new/abseil-cpp-20240722.1/absl/container/internal/raw_hash_set_test.cc
--- old/abseil-cpp-20240722.0/absl/container/internal/raw_hash_set_test.cc      
2024-08-01 20:05:11.000000000 +0200
+++ new/abseil-cpp-20240722.1/absl/container/internal/raw_hash_set_test.cc      
2025-01-23 15:51:12.000000000 +0100
@@ -3594,6 +3594,14 @@
                             "hash/eq functors are inconsistent.");
 }
 
+TEST(Table, MaxSizeOverflow) {
+  size_t overflow = (std::numeric_limits<size_t>::max)();
+  EXPECT_DEATH_IF_SUPPORTED(IntTable t(overflow), "Hash table size overflow");
+  IntTable t;
+  EXPECT_DEATH_IF_SUPPORTED(t.reserve(overflow), "Hash table size overflow");
+  EXPECT_DEATH_IF_SUPPORTED(t.rehash(overflow), "Hash table size overflow");
+}
+
 }  // namespace
 }  // namespace container_internal
 ABSL_NAMESPACE_END

Reply via email to