slip: bound decode() reads against the compressed packet length
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · < 0511ecb00e61bf28e2fec4bb41fcce385c3a3b2d| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
slip: bound decode() reads against the compressed packet length
slhc_uncompress() parses a VJ-compressed TCP header by advancing a pointer through the packet via decode() and pull16(). Neither helper bounds-checks against isize, and decode() masks its return with & 0xffff so it can never return the -1 that callers test for -- those error paths are dead code.
A short compressed frame whose change byte requests optional fields lets decode() read past the end of the packet. The over-read bytes are folded into the cached cstate and reflected into subsequent reconstructed packets.
Make decode() and pull16() take the packet end pointer and return -1 when exhausted. Add a bounds check before the TCP-checksum read. The existing == -1 tests now do what they were always meant to.
From the CVE record · Linux
The Linux kernel’s SLIP decompression code does not bound reads to the compressed packet length. A short VJ-compressed TCP frame requesting optional fields can cause an out-of-bounds read; the bytes read can enter cached state and appear in subsequent reconstructed packets. The input does not specify authentication or user-interaction requirements.
Engineers running Linux kernels with SLIP decompression should check their deployments; affected versions were not provided.