HIGH
wwan t7xx Fragment Overflow
CVE-2026-23172
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
KernelScan AI8.4HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: net: wwan: t7xx: fix potential skb->frags overflow in RX path When receiving data in the DPMAIF RX path, the t7xx_dpmaif_set_frag_to_skb() function adds page fragments to an skb without checking if the number of fragments has exceeded MAX_SKB_FRAGS. This could lead to a buffer overflow in skb_shinfo(skb)->frags[] array, corrupting adjacent memory and potentially causing kernel crashes or other undefined behavior. This issue was identified through static code analysis by comparing with a similar vulnerability fixed in the mt76 driver commit b102f0c522cf ("mt76: fix array overflow on receiving too many fragments for a packet"). The vulnerability could be triggered if the modem firmware sends packets with excessive fragments. While under normal protocol conditions (MTU 3080 bytes, BAT buffer 3584 bytes), a single packet should not require additional fragments, the kernel should not blindly trust firmware behavior. Malicious, buggy, or compromised firmware could potentially craft packets with more fragments than the kernel expects. Fix this by adding a bounds check before calling skb_add_rx_frag() to ensure nr_frags does not exceed MAX_SKB_FRAGS. The check must be performed before unmapping to avoid a page leak and double DMA unmap during device teardown.
02KernelScan AI Analysis
Risk summary
A buffer overflow in the MediaTek T7xx WWAN driver allows malicious modem firmware to corrupt kernel memory by sending packets with too many fragments. This could lead to kernel crashes, privilege escalation, or arbitrary code execution. The vulnerability requires physical access to a system with MediaTek T7xx WWAN hardware and the ability to influence modem firmware behavior.
Vulnerability analysis
Root Cause: The t7xx_dpmaif_set_frag_to_skb() function in the DPMAIF RX path adds page fragments to an skb without checking if the number of fragments exceeds MAX_SKB_FRAGS. This allows unbounded writes to the skb_shinfo(skb)->frags[] array, which can overflow and corrupt adjacent kernel memory.
Attack Surface: This vulnerability requires a MediaTek T7xx WWAN modem device to be present and active. The attack vector is through malicious, buggy, or compromised modem firmware that sends packets with excessive fragments. The vulnerability is triggered during packet reception in the kernel's DPMAIF RX path, making it a local attack that requires physical access to a system with the vulnerable hardware.
Fix Mechanism: The patch adds a bounds check before calling skb_add_rx_frag() to ensure shinfo->nr_frags does not exceed MAX_SKB_FRAGS. The check is performed before DMA unmapping to avoid page leaks and double unmapping issues. If the limit is exceeded, the function returns -EINVAL.
03Fix Versions
| Branch | Fixed in | Patch commit |
|---|---|---|
| 6.1 | 6.1.162 | f9747a7521a4 |
| 6.12 | 6.12.69 | af4b8577d0b3 |
| 6.18 | 6.18.9 | 2c0fb0f60bc1 |
| 6.6 | 6.6.123 | 2a0522f564ac |
| mainline | 6.19 | f0813bcd2d9d |