In the Linux kernel, the following vulnerability has been resolved:
tracing: Fix oob write in trace_seq_to_buffer()
BUG: KASAN: slab-out-of-bounds in trace_seq_to_buffer kernel/trace/trace.c:1830 [inline] BUG: KASAN: slab-out-of-bounds in tracing_splice_read_pipe+0x6be/0xdd0 kernel/trace/trace.c:6822 Write of size 4507 at addr ffff888032b6b000 by task syz.2.320/7260
It has been reported that trace_seq_to_buffer() tries to copy more data than PAGE_SIZE to buf. Therefore, to prevent this, we should use the smaller of trace_seq_used(&iter->seq) and PAGE_SIZE as an argument.
| Software | From | Fixed in |
|---|---|---|
| linux / linux_kernel | 2.6.30 | 5.4.294 |
| linux / linux_kernel | 5.5 | 5.10.238 |
| linux / linux_kernel | 5.11 | 5.15.182 |
| linux / linux_kernel | 5.16 | 6.1.138 |
| linux / linux_kernel | 6.2 | 6.6.90 |
| linux / linux_kernel | 6.7 | 6.12.28 |
| linux / linux_kernel | 6.13 | 6.14.6 |
| linux / linux_kernel | 6.15-rc1 | 6.15-rc1.x |
| linux / linux_kernel | 6.15-rc2 | 6.15-rc2.x |
| linux / linux_kernel | 6.15-rc3 | 6.15-rc3.x |
| linux / linux_kernel | 6.15-rc4 | 6.15-rc4.x |
| debian / debian_linux | 11.0 | 11.0.x |