Branch: refs/heads/master
Home:
https://github.openssl.org/openssl/openssl
Commit: 84782b18e404e4970df7afe045077a2e9436680c
https://github.openssl.org/openssl/openssl/commit/84782b18e404e4970df7afe045077a2e9436680c
Author: Paul Dale <
paul...@oracle.com>
Date: 2026-11-24 (Tue, 24 Nov 2026)
Changed paths:
M include/internal/safe_math.h
Log Message:
-----------
include/internal/safe_math.h: extend the domain of safe fused multiply and divide
Keep the direct multiplication fast path and use binary addition of
quotient/remainder pairs when the product does not fit. Store signed
magnitudes as negative values so that the minimum value is supported
without a wider integer type.
Fixes: b037e3637a49 "header: add integer overflow helper functions"
Assisted-by: ChatGPT:gpt-6-Sol
Reviewed-by: Eugene Syromiatnikov <
es...@openssl.org>
Reviewed-by: Neil Horman <
nho...@openssl.org>
Merge-date: Tue Nov 24 18:13:13 2026
Merged-from:
https://github.com/openssl/openssl/pull/33917
Commit: a90517c22487dec7df69aed515f5e166f4f5db32
https://github.openssl.org/openssl/openssl/commit/a90517c22487dec7df69aed515f5e166f4f5db32
Author: Paul Dale <
paul...@oracle.com>
Date: 2026-11-24 (Tue, 24 Nov 2026)
Changed paths:
M test/
build.info
A test/recipes/02-test_safe_math.t
M test/safe_math_test.c
Log Message:
-----------
Test the extended safe multiply and divide range
Check exact results, overflow, both operand orders and existing error
bits for signed and unsigned inputs through 64 bits. Cover products at
the signed minimum and intermediate products that do not fit.
Add a recipe that runs the safe arithmetic tests with built-in overflow
checks both enabled and disabled.
Assisted-by: ChatGPT:gpt-6-Sol
Reviewed-by: Eugene Syromiatnikov <
es...@openssl.org>
Reviewed-by: Neil Horman <
nho...@openssl.org>
Merge-date: Tue Nov 24 18:13:14 2026
Merged-from:
https://github.com/openssl/openssl/pull/33917
Commit: 83eed255aa534700df51dadb2c5ff8677bbdd831
https://github.openssl.org/openssl/openssl/commit/83eed255aa534700df51dadb2c5ff8677bbdd831
Author: Paul Dale <
paul...@oracle.com>
Date: 2026-11-24 (Tue, 24 Nov 2026)
Changed paths:
M include/internal/safe_math.h
Log Message:
-----------
include/internal/safe_math.h: fix unsigned multiplication overflow results
Return the result already produced by the overflow builtin.
In the portable helper, keep the product unsigned when narrow inputs
promote to int so that an overflowing product remains defined.
Fixes: b037e3637a49 "header: add integer overflow helper functions"
Assisted-by: ChatGPT:gpt-6-Sol
Reviewed-by: Eugene Syromiatnikov <
es...@openssl.org>
Reviewed-by: Neil Horman <
nho...@openssl.org>
Merge-date: Tue Nov 24 18:13:15 2026
Merged-from:
https://github.com/openssl/openssl/pull/33917
Commit: c576d35a85d9fbd8d84b9d0a0e75afd7eeb8c6b5
https://github.openssl.org/openssl/openssl/commit/c576d35a85d9fbd8d84b9d0a0e75afd7eeb8c6b5
Author: Paul Dale <
paul...@oracle.com>
Date: 2026-11-24 (Tue, 24 Nov 2026)
Changed paths:
M include/internal/safe_math.h
Log Message:
-----------
include/internal/safe_math.h: allow minimum signed products in the portable helper
Accept a negative product equal to the signed minimum when neither
factor is one. After the positive-limit check fails, equality
with the minimum quotient identifies the additional representable
product.
Fixes: b037e3637a49 "header: add integer overflow helper functions"
Link:
https://github.com/openssl/openssl/pull/33891
Co-Authored-by: Juan C <
juanc...@protonmail.com>
Assisted-by: ChatGPT:gpt-6-Sol
Reviewed-by: Eugene Syromiatnikov <
es...@openssl.org>
Reviewed-by: Neil Horman <
nho...@openssl.org>
Merge-date: Tue Nov 24 18:13:16 2026
Merged-from:
https://github.com/openssl/openssl/pull/33917
Commit: 7c3d99088bdf115cd82316a7aa322038882423f2
https://github.openssl.org/openssl/openssl/commit/7c3d99088bdf115cd82316a7aa322038882423f2
Author: Paul Dale <
paul...@oracle.com>
Date: 2026-11-24 (Tue, 24 Nov 2026)
Changed paths:
M include/internal/safe_math.h
Log Message:
-----------
include/internal/safe_math.h: fix unsigned limits for narrow integer types
Cast the complemented value back to the requested type. Otherwise,
integer promotion makes the unsigned char and short limits equal -1.
Fixes: b037e3637a49 "header: add integer overflow helper functions"
Assisted-by: ChatGPT:gpt-6-Sol
Reviewed-by: Eugene Syromiatnikov <
es...@openssl.org>
Reviewed-by: Neil Horman <
nho...@openssl.org>
Merge-date: Tue Nov 24 18:13:17 2026
Merged-from:
https://github.com/openssl/openssl/pull/33917
Commit: 933a44fa966ddaf61a160753322e2702e25835c6
https://github.openssl.org/openssl/openssl/commit/933a44fa966ddaf61a160753322e2702e25835c6
Author: Paul Dale <
paul...@oracle.com>
Date: 2026-11-24 (Tue, 24 Nov 2026)
Changed paths:
M test/safe_math_test.c
Log Message:
-----------
test/safe_math_test.c: test general safe arithmetic boundaries
Check signed and unsigned limits and boundary operations for char
and short, including multiplication overflow and their use in fused
multiply and divide operations.
Cover signed products equal to the minimum value and products just
outside the type range.
Link:
https://github.com/openssl/openssl/pull/33891
Co-Authored-by: Juan C <
juanc...@protonmail.com>
Assisted-by: ChatGPT:gpt-6-Sol
Reviewed-by: Eugene Syromiatnikov <
es...@openssl.org>
Reviewed-by: Neil Horman <
nho...@openssl.org>
Merge-date: Tue Nov 24 18:13:18 2026
Merged-from:
https://github.com/openssl/openssl/pull/33917
Commit: f13c02fe2d47d063e568452a95c134aec4a2ebd9
https://github.openssl.org/openssl/openssl/commit/f13c02fe2d47d063e568452a95c134aec4a2ebd9
Author: Pauli <
paul...@oracle.com>
Date: 2026-11-24 (Tue, 24 Nov 2026)
Changed paths:
M doc/internal/man3/OSSL_SAFE_MATH_SIGNED.pod
Log Message:
-----------
doc: remove note about safe-math's muldiv being imperfect
There should be no inputs that error when they shouldn't.
The converse was and still is true.
Reviewed-by: Eugene Syromiatnikov <
es...@openssl.org>
Reviewed-by: Neil Horman <
nho...@openssl.org>
Merge-date: Tue Nov 24 18:13:19 2026
Merged-from:
https://github.com/openssl/openssl/pull/33917
Compare:
https://github.openssl.org/openssl/openssl/compare/5928f99e9cee...f13c02fe2d47
To unsubscribe from these emails, change your notification settings at
https://github.openssl.org/openssl/openssl/settings/notifications