net/ipv6: ioam6: prevent schema length wraparound in trace fill
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 8c6f6fa6772696be0c047a711858084b38763728 · < d6e1c9b02d85a4f1f4ba6d68e916d9b610a3ed7d| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net/ipv6: ioam6: prevent schema length wraparound in trace fill
ioam6_fill_trace_data() stores the schema contribution to the trace length in a u8. With bit 22 enabled and the largest schema payload, sclen becomes 1 + 1020 / 4, wraps from 256 to 0, and bypasses the remaining-space check. __ioam6_fill_trace_data() then positions the write cursor without reserving the schema area but still copies the 4-byte schema header and the full schema payload, overrunning the trace buffer.
Keep sclen in an unsigned int so the remaining-space check and the write cursor calculation both see the full schema length.
From the CVE record · Linux
The Linux kernel's IPv6 IOAM6 trace-fill code can miscalculate the space needed for a schema when bit 22 is enabled and the schema payload is at its largest size. This can cause a write beyond the trace buffer. The input does not specify whether exploitation is remote or local, requires authentication, or needs user interaction.
Engineers running Linux kernels with IPv6 IOAM6 support should check their versions; affected versions were not provided.