nfc: llcp: read llcp_sock->local under the socket lock in getsockopt
- 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.270, 5.15.221, 6.1.188, 6.6.157, 6.12.110, 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: read llcp_sock->local under the socket lock in getsockopt nfc_llcp_getsockopt() read llcp_sock->local before lock_sock(sk) and then dereferenced the cached pointer inside the locked region. llcp_sock_bind() assigns and clears llcp_sock->local under the same socket lock, dropping the last reference on its error path. A getsockopt() racing an in-flight bind() can observe the pointer, block on lock_sock(), and then dereference a freed nfc_llcp_local once bind() has unwound. Move the llcp_sock->local read and the NULL check inside the lock_sock(sk) region so bind() cannot mutate or free the pointer between the load and the use.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From 26fd76cab2e61cedc5c25f7151fb31b57ddc53c7 · fixed in 56fd158fef20268f48db6cdfe5d722e930134eda; From 26fd76cab2e61cedc5c25f7151fb31b57ddc53c7 · fixed in 8ba8cec0586727cc135ca4827921fc7b52946d71; From 26fd76cab2e61cedc5c25f7151fb31b57ddc53c7 · fixed in ed5240bab3468988077fe8bf29b935eaecc9ff89; From 26fd76cab2e61cedc5c25f7151fb31b57ddc53c7 · fixed in fe65727a4a21b11c18eebae1338482767a897b76; From 26fd76cab2e61cedc5c25f7151fb31b57ddc53c7 · fixed in 2d8ac24565be85bf56580b87bf1b874d35625eb5; From 26fd76cab2e61cedc5c25f7151fb31b57ddc53c7 · fixed in 156e65bd29307f5053835bff60bc1ba342fa010f; From 26fd76cab2e61cedc5c25f7151fb31b57ddc53c7 · fixed in d1b73962675cdc5a58e2707e25b548d8b495fde0; From 26fd76cab2e61cedc5c25f7151fb31b57ddc53c7 · fixed in 36812527052c5bfb1ec6c1e292d67a5bf76b750f
- Linux Linux
3.10
- KernelLinux
From 3.10.0 · fixed in 5.10.270; From 5.11.0 · fixed in 5.15.221; From 5.16.0 · fixed in 6.1.188; From 6.2.0 · fixed in 6.6.157; From 6.7.0 · fixed in 6.12.110; From 6.13.0 · fixed in 6.18.52; From 6.19.0 · fixed in 7.2.6
References 8
git.kernel.org
- stable/c/56fd158fef20268f48db6cdfe5d722e930134eda
- stable/c/8ba8cec0586727cc135ca4827921fc7b52946d71
- stable/c/ed5240bab3468988077fe8bf29b935eaecc9ff89
- stable/c/fe65727a4a21b11c18eebae1338482767a897b76
- stable/c/2d8ac24565be85bf56580b87bf1b874d35625eb5
- stable/c/156e65bd29307f5053835bff60bc1ba342fa010f
- stable/c/d1b73962675cdc5a58e2707e25b548d8b495fde0
- stable/c/36812527052c5bfb1ec6c1e292d67a5bf76b750f