-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Closed
Description
The SHA2 *_{Init,Update,Final,Transform}() functions on FreeBSD (manual) and NetBSD (cf manual) collide with functions of the same name in OpenSSL. The signatures are incompatible (return types and contexts).
This leads to undesirable runtime failures when using -fsanitize=-address in combination with -lcrypto.
Not all of the below are problematic for both FreeBSD and NetBSD, but should probably be audited in detail and potentially be removed.
llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
Lines 564 to 570 in 880ee48
| #define SANITIZER_INTERCEPT_SHA1 SI_NETBSD | |
| #define SANITIZER_INTERCEPT_MD4 SI_NETBSD | |
| #define SANITIZER_INTERCEPT_RMD160 SI_NETBSD | |
| #define SANITIZER_INTERCEPT_MD5 (SI_NETBSD || SI_FREEBSD) | |
| #define SANITIZER_INTERCEPT_FSEEK (SI_NETBSD || SI_FREEBSD) | |
| #define SANITIZER_INTERCEPT_MD2 SI_NETBSD | |
| #define SANITIZER_INTERCEPT_SHA2 (SI_NETBSD || SI_FREEBSD) |
See libressl/portable#1098, openssl/openssl#25456, and https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281685 for more details.