Re: [PATCH net v2] net: wwan: t7xx: validate PIT data before building RX skb
From: Fang Xieyan
Date: Mon Nov 23 2026 - 18:40:54 EST
The issue was found during a security review of the t7xx driver's
device-supplied input paths, assisted by the Hawkeye agent
(LLM-based code analysis).
It is reproduced at runtime, not only theoretical. No t7xx hardware
is available, so a fault-injection harness in a KASAN-enabled QEMU
guest synthesizes malformed PIT entries and drives the RX assembly
paths; this is a synthetic trigger, not a natural one.
On the normal path, a PIT data address 128 bytes below the BAT DMA
base yields an int offset of -128. The unpatched code accepts it,
skb_reserve() moves skb->data before skb->head, and reading the
payload triggers:
BUG: KASAN: slab-out-of-bounds in t7xx15_harness_run+0x1a5e/0x2340 [mtk_t7xx]
Read of size 1 at addr ff110000013bd000 by task insmod/71
Call Trace:
<TASK>
dump_stack_lvl+0x55/0x70
print_report+0x10d/0x5d0
kasan_report+0x96/0xd0
t7xx15_harness_run+0x1a5e/0x2340 [mtk_t7xx]
t7xx_pci_init+0x9/0xff0 [mtk_t7xx]
do_one_initcall+0x84/0x350
do_init_module+0x29d/0x800
load_module+0x510c/0x6630
init_module_from_file+0x15d/0x180
idempotent_init_module+0x320/0x670
__x64_sys_finit_module+0xbd/0x120
do_syscall_64+0xee/0x500
entry_SYSCALL_64_after_hwframe+0x77/0x7f
</TASK>
The buggy address belongs to the object at ff110000013bcd00
which belongs to the cache skbuff_small_head of size 704
The buggy address is located 64 bytes to the right of
allocated 704-byte region [ff110000013bcd00, ff110000013bcfc0)
A second input, where the u64 address difference narrows to a small
positive int, is also accepted by the unpatched code. On the
fragment path, a negative offset likewise reaches the page copy and
faults on an unmapped address. With this patch applied, all of
these inputs are rejected (-ENOBUFS on the normal path, -EINVAL on
the fragment path) and no KASAN report or fault is produced.