nfc: llcp: drop truncated I/RR/RNR PDUs in nfc_llcp_recv_hdlc()
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 5.10.271, 5.15.222, 6.1.189, 6.6.158, 6.12.112, and 2 more
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
In the Linux kernel, the following vulnerability has been resolved: nfc: llcp: drop truncated I/RR/RNR PDUs in nfc_llcp_recv_hdlc() nfc_llcp_recv_hdlc() reads the sequence byte skb->data[2], via nfc_llcp_ns()/nfc_llcp_nr(), before any length check. The receive path only guarantees the two-byte LLCP header -- __nfc_llcp_recv() checks it with pskb_may_pull() and nfc_llcp_recv_agf() admits two-byte inner PDUs -- so a two-byte I, RR or RNR PDU reads one byte of uninitialised skb tailroom. The byte becomes N(R)/N(S); a peer can already set those with a well-formed PDU, so this is acting on uninitialised memory, not new peer control. Guard the read with pskb_may_pull(), as commit 95674f506c63 ("nfc: llcp: reject PDUs shorter than the LLCP header") did for the two-byte header, so the sequence byte is present and linear before it is read. RR and RNR PDUs are LLCP_HEADER_SIZE + LLCP_SEQUENCE_SIZE bytes and an I PDU is longer, so no valid frame is rejected; a truncated PDU is malformed, so return without a DM reply.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From d646960f7986fefb460a2b062d5ccc8ccfeacc3a · fixed in 3afdbebfee2ef7e9510880868cfb482cbffe6836; From d646960f7986fefb460a2b062d5ccc8ccfeacc3a · fixed in 9b4086eb67a9a3b1ce69fef1b6793827363703ce; From d646960f7986fefb460a2b062d5ccc8ccfeacc3a · fixed in 51b6d73373589abb9de4d84767b0db1bc8d395d9; From d646960f7986fefb460a2b062d5ccc8ccfeacc3a · fixed in 066205553a0106565bcede934f5721c25ebd6e4e; From d646960f7986fefb460a2b062d5ccc8ccfeacc3a · fixed in 18f60ee882403d5b48097f5f6ae45f794e4cc643; From d646960f7986fefb460a2b062d5ccc8ccfeacc3a · fixed in 810f204ef8f61f0c930cf6b3280050b3ee6a8ae7; From d646960f7986fefb460a2b062d5ccc8ccfeacc3a · fixed in 744e61bd06188d8bb068c26a461c252f242b05c9; From d646960f7986fefb460a2b062d5ccc8ccfeacc3a · fixed in 273f9d667cde649f8de9d72b1303cc2f4b658c50
- Linux Linux
3.3
- KernelLinux
From 3.3.0 · fixed in 5.10.271; From 5.11.0 · fixed in 5.15.222; From 5.16.0 · fixed in 6.1.189; From 6.2.0 · fixed in 6.6.158; From 6.7.0 · fixed in 6.12.112; From 6.13.0 · fixed in 6.18.55; From 6.19.0 · fixed in 7.2.9
References 8
git.kernel.org
- stable/c/3afdbebfee2ef7e9510880868cfb482cbffe6836
- stable/c/9b4086eb67a9a3b1ce69fef1b6793827363703ce
- stable/c/51b6d73373589abb9de4d84767b0db1bc8d395d9
- stable/c/066205553a0106565bcede934f5721c25ebd6e4e
- stable/c/18f60ee882403d5b48097f5f6ae45f794e4cc643
- stable/c/810f204ef8f61f0c930cf6b3280050b3ee6a8ae7
- stable/c/744e61bd06188d8bb068c26a461c252f242b05c9
- stable/c/273f9d667cde649f8de9d72b1303cc2f4b658c50