nfc: fdp: bound the device-reported read length and fix an skb leak
Published Sep 4, 2026
No CVSS score
EPSS 0.24%
Description
fdp_nci_i2c_read() takes the next packet length from two device-supplied bytes and never validates it. The value is a u16 used as the i2c_master_recv() count into a 261-byte on-stack buffer: a malicious, counterfeit or malfunctioning controller (or an i2c bus interposer) can drive it far past the buffer for a stack out-of-bounds write that clobbers the canary and return address, or below the minimum frame size (directly, or by truncating the computed sum) so the header/LRC strip and the next length read run past a short receive. Reject a length outside [FDP_NCI_I2C_MIN_PAYLOAD, FDP_NCI_I2C_MAX_PAYLOAD], as a corrupted packet already is, and force resynchronization.
The same loop allocates one data skb per iteration and assumes a length packet followed by a data packet; a device that sends two data packets in one call leaks the first skb when the second allocation overwrites it. Free a previously allocated skb before allocating the next.
Affected products
-
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version
-
- Version 4.4StatusaffectedConstraints-
- Version 0StatusunaffectedConstraints<4.4
- Version 5.10.267StatusunaffectedConstraints<=5.10.*
- Version 5.15.218StatusunaffectedConstraints<=5.15.*
- Version 6.1.185StatusunaffectedConstraints<=6.1.*
- Version 6.12.106StatusunaffectedConstraints<=6.12.*
- Version 6.18.47StatusunaffectedConstraints<=6.18.*
- Version 6.6.154StatusunaffectedConstraints<=6.6.*
- Version 7.1.11StatusunaffectedConstraints<=7.1.*
- Version 7.2.1StatusunaffectedConstraints<=7.2.*
- Version 7.3-rc1StatusunaffectedConstraints<=*
- Version
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Linux | Linux | unaffected |
| ||||||||||||||||||||||||||||||||||||
| Linux | Linux | affected |
|
No data.
No data.
No Red Hat product state for this CVE.
No package ranges for this CVE.
Remediation
No remediation recorded yet.
No CWE recorded.
References (9)
- https://git.kernel.org/stable/c/0d723090645b82c1cb27cfd7ebf81f0e7c96bcae
- https://git.kernel.org/stable/c/1aa3fc769b0c45bd19f8dab1697084c2b3f6d706
- https://git.kernel.org/stable/c/1fc32327b927a6e2cde086f82575c29880844228
- https://git.kernel.org/stable/c/7ad21dcfeb5181af0c3ee2608808c0c0a5283aa1
- https://git.kernel.org/stable/c/8d2c243b79854628ff076c38748c020042f02f57
- https://git.kernel.org/stable/c/d9498ab9a78cb63d78dbe4f221d8cc6c91f285ee
- https://git.kernel.org/stable/c/db7e464b350969c6ea8340de00d9796e5fd5123b
- https://git.kernel.org/stable/c/e5eec121f2c3bc4c7022613bedd9121a8aa4c949
- https://git.kernel.org/stable/c/fc3c2bd5b1ec6c7cbc8a50e32d9bcec114f25463
Change history (0)
No recorded changes yet.