diff options
| author | Pengpeng Hou <pengpeng@iscas.ac.cn> | 2026-03-25 15:41:52 +0800 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2026-03-27 12:05:36 +0000 |
| commit | 5e67ba9bb531e1ec6599a82a065dea9040b9ce50 (patch) | |
| tree | ccd9e96d7d77aaf249f6b9d35041c860308d7952 /drivers/usb/input/git@git.tavy.me:linux.git | |
| parent | ae05340ccaa9d347fe85415609e075545bec589f (diff) | |
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.
Fixes: 8c6f6fa67726 ("ipv6: ioam: IOAM Generic Netlink API")
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Reviewed-by: Justin Iurman <justin.iurman@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/usb/input/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
