Branch: refs/heads/openssl-4.1
Home:
https://github.openssl.org/openssl/openssl
Commit: 60cfb06c3039e4536e38473ff1f0c7aa502abf4a
https://github.openssl.org/openssl/openssl/commit/60cfb06c3039e4536e38473ff1f0c7aa502abf4a
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
(cherry picked from commit 84782b18e404e4970df7afe045077a2e9436680c)
Commit: 39eda6eced125429cf701029d4e6bc493940ee0e
https://github.openssl.org/openssl/openssl/commit/39eda6eced125429cf701029d4e6bc493940ee0e
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
(cherry picked from commit a90517c22487dec7df69aed515f5e166f4f5db32)
Commit: 18edfd61131ae112de1d116b41e4597ea3afb008
https://github.openssl.org/openssl/openssl/commit/18edfd61131ae112de1d116b41e4597ea3afb008
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
(cherry picked from commit 83eed255aa534700df51dadb2c5ff8677bbdd831)
Commit: abee193bd5f06e732abf4983fcb5e2f5fcae2e76
https://github.openssl.org/openssl/openssl/commit/abee193bd5f06e732abf4983fcb5e2f5fcae2e76
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
(cherry picked from commit c576d35a85d9fbd8d84b9d0a0e75afd7eeb8c6b5)
Commit: 56b8a22bfb70fd5bacbcd57ffeebcbd3b7c873fa
https://github.openssl.org/openssl/openssl/commit/56b8a22bfb70fd5bacbcd57ffeebcbd3b7c873fa
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
(cherry picked from commit 7c3d99088bdf115cd82316a7aa322038882423f2)
Commit: 7b159548e22b1d47268919669d49855adc4d792f
https://github.openssl.org/openssl/openssl/commit/7b159548e22b1d47268919669d49855adc4d792f
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
(cherry picked from commit 933a44fa966ddaf61a160753322e2702e25835c6)
Commit: 459b22d71deeed349848c2b7652f932637b31da6
https://github.openssl.org/openssl/openssl/commit/459b22d71deeed349848c2b7652f932637b31da6
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
(cherry picked from commit f13c02fe2d47d063e568452a95c134aec4a2ebd9)
Compare:
https://github.openssl.org/openssl/openssl/compare/73aed8d5e343...459b22d71dee
To unsubscribe from these emails, change your notification settings at
https://github.openssl.org/openssl/openssl/settings/notifications