net: slip: serialize receive against buffer reallocation
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · < 5d07b178bef511d69558cfc89fe1129258dc39f8| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: slip: serialize receive against buffer reallocation
sl_realloc_bufs() replaces rbuff and updates buffsize while holding sl->lock. slip_receive_buf() reads those fields and writes through rbuff without holding the lock.
An MTU change can therefore race with receive processing. An MTU shrink can expose the new smaller rbuff with the old larger bound, causing an out-of-bounds write. A receive callback which already loaded the old rbuff can instead continue writing after that buffer has been freed.
Serialize receive processing with sl_realloc_bufs() by holding sl->lock while consuming each receive batch.
From the CVE record · Linux
Linux kernel SLIP receive processing can race with buffer reallocation during an MTU change. If an MTU change overlaps with receive processing, the race can cause an out-of-bounds write or a write to a freed buffer. The input does not specify attacker access requirements or user interaction.
Engineers running the Linux kernel should check whether their kernel includes the affected SLIP code; affected versions are not specified.