SIGBUS in quic_memfail_test on OpenBSD/sparc64 with clang
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 62/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- c
- Ambito
- networking, testing
Direzione di ricerca
Inizia da test_quic_peer_token_fail() in test/quic_memfail_test.c, vicino alla riga 214, dove un letterale stringa viene convertito in struct in_addr. Il lato della libreria è BIO_ADDR_rawmake() in crypto/bio/bio_addr.c. Per riprodurre il problema serve una piattaforma con allineamento stretto, come OpenBSD/sparc64, eseguendo make test TESTS=test_quic_memfail. È completato quando il test non genera più SIGBUS, ad esempio copiando i byte con memcpy in una struct in_addr.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
OpenSSL 4.1 added the test_quic_peer_token_fail() test via https://github.com/openssl/openssl/pull/31333.
It contains this line
https://github.com/openssl/openssl/blob/45c8f381b5513feaead63e294e901a5a58566bcb/test/quic_memfail_test.c#L214
which ends up doing the equivalent of *(struct in_addr *)"\x7f\x00\x00\x01" in BIO_ADDR_rawmake():
https://github.com/openssl/openssl/blob/0cb912ae302a85caaf7e3f698a336b1ac11ecab1/crypto/bio/bio_addr.c#L149
There is no guarantee that a string constant is properly aligned for this construct to be legal, and it happens to result in an unaligned access, hence SIGBUS on this architecture/OS/compiler when running
$ make test TESTS=test_quic_memfail
The "RAW ADDRESSES" section of the BIO_ADDR_rawmake() manual states
Both
BIO_ADDR_rawmake()andBIO_ADDR_rawaddress()take a pointer to a network byte order address of a specific site. Internally, those are treated as a pointer tostruct in_addr(forAF_INET), [...]
which suggests that the test source is at fault.
It is easy enough to fix or work around this by using memcpy() to place the string in a struct in_addr. The fix could happen in the test itself, or in the library source for the sake of robustness of BIO_ADDR_rawmake().
- Lingua principale
- C
- Stelle
- 31.4k
- Fork
- 11.6k
- Merge medio
- 20m
- PR unite (30g)
- 2
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di openssl/openssl
-
issue: bug report
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 74/100
I maintainer di solito rispondono entro 2 giorni
-
sk_TYPE_find*() on built-in stack types still requires a non-const STACK_OFForse già presa @bob-beck l’ha presa 1 giorno fa. Apertabranch: 4.0 branch: 4.1 branch: master triaged: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
openssl/openssl#33707 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
`EVP_PKEY_get_utf8_string_param()` size query returns 0 for an empty value such as `mandatory-digest` of EdDSA/ML-DSA keysForse già presa @Regex0000 l’ha presa oggi. Apertabranch: 3.5 branch: 4.0 branch: 4.1 branch: master good first issue help wanted triaged: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
openssl/openssl#33698 · 3 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
s_server -unix exits on macOS while reporting the listener addressForse già presa @gustafn l’ha presa 1 giorno fa. Apertabranch: 3.5 branch: 4.0 branch: 4.1 branch: master good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
openssl/openssl#33660 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
`SSL_get_conn_close_info()` returns `-1` instead of the documented `0` on unsupported objectsApertabranch: 3.5 branch: 4.0 branch: 4.1 branch: master help wanted triaged: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
openssl/openssl#33637 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di openssl/openssl
Issue simili
-
Status: Opened
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
FriendsofECCE/ECCE#1018 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
immortalwrt/immortalwrt#2522 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
severity: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
luainkernel/lunatik#2530 ·
I maintainer di solito rispondono entro 1 giorno