UndefinedBehaviorSanitizer: security/nss/lib/ssl/ssl3con.c:13150:47: runtime error: applying zero offset to null pointer with HTTP/2 Proxy
Categories
(NSS :: Libraries, defect, P2)
Tracking
(firefox105 wontfix)
| Tracking | Status | |
|---|---|---|
| firefox105 | --- | wontfix |
People
(Reporter: decoder, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: crash, sec-other, testcase)
Attachments
(5 files)
The attached testcase crashes on mozilla-central revision 20220819-58a08b3c7632 (build with (metadatabuildFlags not available)).
For detailed crash information, see attachment.
To reproduce the issue, perform the following steps:
- Download the attached testcase, save as "test.bin".
2a. Build with--enable-fuzzing(requires Clang and ASan, also build gtests using./mach gtest dontruntests).
2b. Alternatively you can download builds from TC usingpython -mfuzzfetch -a --fuzzing --target firefox gtest(see https://github.com/MozillaSecurity/fuzzfetch). - Run
FUZZER=NetworkHttp2ProxyHttp2 objdir/dist/bin/firefox test.bin
I'm marking this one s-s because I don't know what exactly is happening here and the failure is deep inside critical TLS code. I can't easily test what would happen without UBSan but having null pointers with null offsets there feels wrong in any case. Note that if this is UB, the compiler can reorder/optimize things and potentially worse things can happen.
I also minimized the attached testcase on the byte level to make it easier to figure out what's going on.
| Reporter | ||
Comment 1•4 years ago
|
||
| Reporter | ||
Comment 2•4 years ago
|
||
Comment 3•4 years ago
|
||
According to this comment, it seems this undefined behavior is fine.
Comment 4•4 years ago
|
||
More details:
- The crash is at this line where
cText->buf->bufis NULL andivLenis 0. cText->buf->bufis NULL because we got an empty record. This line showsgs->inbuf.lenis 0.
I think this is more like an NSS issue, since what necko did is only calling SSL_ForceHandshake.
Dennis, could you take a look?
Thanks.
Comment 5•4 years ago
|
||
Doesn't look exploitable, but also we probably didn't want a null pointer there and will crash soon anyway? Or if there's a null check saving us maybe that could be moved earlier.
Updated•4 years ago
|
Comment 6•3 years ago
|
||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 7•3 years ago
|
||
The bug assignee is inactive on Bugzilla, and this bug has severity 'S2'.
:beurdouche, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 8•3 years ago
|
||
This ensures we properly test the different DTLS / TLS versions and makes the
expected behaviour explicit.
Comment 9•3 years ago
|
||
This is based on the patch developed by Leander in D157183, but is a
little more explicit.
Co-Authored-By: Leander Schwarz
Depends on D176156
Comment 10•2 years ago
|
||
@Dennis, when you have some time, can you land this please ? : ) Thanks !
Updated•2 years ago
|
Updated•2 years ago
|
Comment 11•2 years ago
|
||
This was landed over a year ago in https://hg.mozilla.org/projects/nss/rev/d7004499cff88b5fd04c41f5c17bfbbbb8679f76
Updated•2 years ago
|
Updated•5 days ago
|
Description
•