-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Havege does arithmetic on signed int #2598
Closed
gilles-peskine-arm opened this issue
Apr 24, 2019
· 1 comment
· Fixed by ARMmbed/mbed-crypto#149 or #2699
Closed
Havege does arithmetic on signed int #2598
gilles-peskine-arm opened this issue
Apr 24, 2019
· 1 comment
· Fixed by ARMmbed/mbed-crypto#149 or #2699
Labels
bug
component-crypto
Crypto primitives and low-level interfaces
component-platform
Portability layer and build scripts
Comments
gilles-peskine-arm
added
bug
component-crypto
Crypto primitives and low-level interfaces
component-platform
Portability layer and build scripts
labels
Apr 24, 2019
Regardless of this potential bug in |
gilles-peskine-arm
added a commit
to gilles-peskine-arm/mbedtls
that referenced
this issue
Jun 7, 2019
Update havege.h to the new version in the crypto module. This is technically an API break, since the type mbedtls_havege_state is exposed in a public header. However normal applications should not be affected. Fix Mbed-TLS#2598
gilles-peskine-arm
added a commit
to gilles-peskine-arm/mbedtls
that referenced
this issue
Jun 7, 2019
Update havege.h to the new version in the crypto module. This is technically an API break, since the type mbedtls_havege_state is exposed in a public header. However normal applications should not be affected. Fix Mbed-TLS#2598
gilles-peskine-arm
added a commit
to gilles-peskine-arm/mbedtls
that referenced
this issue
Jun 7, 2019
Update havege.h to the new version in the crypto module. This is technically an API break, since the type mbedtls_havege_state is exposed in a public header. However normal applications should not be affected. Fix Mbed-TLS#2598
gilles-peskine-arm
added a commit
to gilles-peskine-arm/mbedtls
that referenced
this issue
Jun 14, 2019
Update havege.h to the new version in the crypto module. This is technically an API break, since the type mbedtls_havege_state is exposed in a public header. However normal applications should not be affected. There is no ABI break on platforms where uint32_t and int are treated identically, which is virtually all of them. Fix Mbed-TLS#2598
This was referenced Jun 14, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
component-crypto
Crypto primitives and low-level interfaces
component-platform
Portability layer and build scripts
Description
Runtime failure with Asan
scripts/config.pl full; scripts/config.pl unset MBEDTLS_MEMORY_BACKTRACE
or
scripts/config.pl full; scripts/config.pl unset MBEDTLS_MEMORY_BACKTRACE; scripts/config.pl unset MBEDTLS_MEMORY_BUFFER_ALLOC_C; scripts/config.pl unset MBEDTLS_MEMORY_DEBUG
Asan
andAsanDbg
.Note that I'm getting Asan complaints only with Clang, not with GCC. We run this test (in the configuration
full
minusMBEDTLS_MEMORY_BACKTRACE
) on CI, but only with GCC, not with Clang, which is why we didn't notice sooner. I'm still surprised we never noticed in developer builds, though. I often test with clang+asan! So there may still be some extra condition needed to reproduce the complaints.Analysis of
havege.c
havege.c
does indeed perform bit shifts onint
that may cause an overflow. A shift that overflows a signed integer has undefined behavior in C. Asan's complaints are legitimate.The text was updated successfully, but these errors were encountered: