Linux: net: wwan: t7xx: validate the netif index in t7xx_ccmni_recv_skb()
What fixes it
- 7c2fe308bda5a7e6222d7f0c3c311991372baab4LinuxCVE List
- 9dbf13de4edff6fbc1f7ad9c4040326b6ed599adLinuxCVE List
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
In the Linux kernel, the following vulnerability has been resolved:
net: wwan: t7xx: validate the netif index in t7xx_ccmni_recv_skb()
The netif index carried in the DPMAIF PIT header is five bits wide, but ccmni_inst[] only has room for NIC_DEV_MAX (21) entries. t7xx_ccmni_recv_skb() indexes the array without a bounds check, so indexes 21 to 31 read past it. The out-of-bounds value lands in the callback table that follows the array, which is never NULL, so the existing !ccmni check does not catch it and the driver dereferences whatever sits there as a struct t7xx_ccmni.
Drop the skb when the index is out of range.
Verified in a QEMU guest with a fault injector setting the netif index to 25: the unpatched driver reads a value past ccmni_inst[], which lands in the callback table, and dereferences it far enough to queue the skb. With this check the packet is dropped. Well-formed traffic on index 0 is unaffected.
Changes in v2: none.
Text from CVE List
Affected versions 14
- Linuxaffected: 05d19bf500f8281f574713479b04679fa226d0a3 before 7c2fe308bda5a7e6222d7f0c3c311991372baab4CVE List
- Linuxaffected: 05d19bf500f8281f574713479b04679fa226d0a3 before fba45070e25abdae08bcaebfadeef050dc39e208CVE List
- Linuxaffected: 05d19bf500f8281f574713479b04679fa226d0a3 before e1b0609b1a40da03e385be290853a604eb4c3fb9CVE List
- Linuxaffected: 05d19bf500f8281f574713479b04679fa226d0a3 before 9dbf13de4edff6fbc1f7ad9c4040326b6ed599adCVE List
- Linuxaffected: 05d19bf500f8281f574713479b04679fa226d0a3 before d28aa2de9654e8024922775520a2665e00c04ad5CVE List
- Linuxaffected: 05d19bf500f8281f574713479b04679fa226d0a3 before c7ead9704249d57d4693a04697e3bbd285138fa9CVE List
- Linuxaffected: 5.19CVE List
- Linuxunaffected: all versions before 5.19CVE List
- Linuxunaffected: 6.1.189 through 6.1.*CVE List
- Linuxunaffected: 6.6.158 through 6.6.*CVE List
- Linuxunaffected: 6.12.112 through 6.12.*CVE List
- Linuxunaffected: 6.18.54 through 6.18.*CVE List
- Linuxunaffected: 7.2.8 through 7.2.*CVE List
- Linuxunaffected: 7.3CVE List
References 6
- git.kernel.org/stable/c/7c2fe308bda5a7e6222d7f0c3c311991372baab4Referencevia CVE List
- git.kernel.org/stable/c/fba45070e25abdae08bcaebfadeef050dc39e208Referencevia CVE List
- git.kernel.org/stable/c/e1b0609b1a40da03e385be290853a604eb4c3fb9Referencevia CVE List
- git.kernel.org/stable/c/9dbf13de4edff6fbc1f7ad9c4040326b6ed599adReferencevia CVE List
- git.kernel.org/stable/c/d28aa2de9654e8024922775520a2665e00c04ad5Referencevia CVE List
- git.kernel.org/stable/c/c7ead9704249d57d4693a04697e3bbd285138fa9Referencevia CVE List