Commit 936cc70
Fix OOB read in Lz4Immutable::decompress (MACA-2026-001)
Summary:
`memcache/mcrouter-fbpkg` R5519-R5520 fail at the Contbuild Tracking Node: lionhead fuzz harnesses reproduce a confirmed out-of-bounds read in `Lz4Immutable::decompress` (MACA-2026-001, T267172411). A malicious memcache backend sends a Caret reply whose 16-bit match `offset` exceeds the dictionary+output window; the `size_t` subtraction underflows and `IovecCursor::peekInto` reads past the stack-local dictionary iovec. This reproduces the security-certified fix from D104024019 (abandoned only for a CodemodService landing limitation): validate `offset`, `matchPos`, and `matchLength` against the window and return `nullptr` on malformed input, like the existing literal-copy guard.
Sentinel-Harness: claude
Differential Revision: D112676476
fbshipit-source-id: fe74575157de68d5d9be0f1d9d7ae977c1c29af81 parent 6a672a9 commit 936cc70
1 file changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
539 | 539 | | |
540 | 540 | | |
541 | 541 | | |
542 | | - | |
543 | 542 | | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
544 | 552 | | |
545 | 553 | | |
546 | 554 | | |
| |||
554 | 562 | | |
555 | 563 | | |
556 | 564 | | |
557 | | - | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
558 | 568 | | |
559 | 569 | | |
560 | 570 | | |
| |||
0 commit comments