nfc: fix use-after-free in nfc_get_local_general_bytes

Summary

CVECVE-2026-98483
StatePUBLISHED
AssignerLinux
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-10-18 16:16:58 UTC
Updated2026-10-19 10:18:59 UTC
DescriptionIn the Linux kernel, the following vulnerability has been resolved: nfc: fix use-after-free in nfc_get_local_general_bytes Commit 6709d4b7bc2e ("net: nfc: Fix use-after-free caused by nfc_llcp_find_local") attempted to fix a use-after-free (UAF) issue by invoking nfc_llcp_local_put(local) after accessing local->gb. However, if the reference count drops to zero, local is freed immediately, leading to a use-after-free when callers access the returned pointer. Alternative approaches using dynamic allocation (e.g. kmemdup) introduced memory leaks because callers consistently treat the returned pointer as borrowed memory. Fix this properly by refactoring nfc_llcp_general_bytes() and nfc_get_local_general_bytes() to accept a caller-provided output buffer (out_gb) and its maximum length (gb_max_len). The general bytes are safely copied into out_gb before calling nfc_llcp_local_put(local), ensuring safe lifetime management without ownership transfer complications. Update all callers across drivers (microread, pn533, pn544, st21nfca, digital_dep, and nci) to provide their own destination buffers and pass them to nfc_get_local_general_bytes().

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Linux Linux affected 96f2c6f272ec04083d828de46285a7d7b17d1aad 25bfa673adc70189c0bc872940421ae59f789cf6 git Not specified
CNA Linux Linux affected fc8429f8d86801f092fbfbd257c3af821ac0dcd3 2b31d0cc95856c856ada91f943fb14dfdf29a923 git Not specified
CNA Linux Linux affected 425d9d3a92df7d96b3cfb7ee5c240293a21cbde3 c40f61a6a413f3eaf028e5fe367fd9749e503ab0 git Not specified
CNA Linux Linux affected 6709d4b7bc2e079241fdef15d1160581c5261c10 19bcfc2a56d0b82919079b5424c5a9a0ac897dcf git Not specified
CNA Linux Linux affected 6709d4b7bc2e079241fdef15d1160581c5261c10 d8c929e9afdbc33b1876ecb97a517e850449b5bd git Not specified
CNA Linux Linux affected 6709d4b7bc2e079241fdef15d1160581c5261c10 841af260ff477f6191872bc3b2e15488615c1827 git Not specified
CNA Linux Linux affected 6709d4b7bc2e079241fdef15d1160581c5261c10 9ede11e12f965ace97c4e0f606667f24fb41e7e1 git Not specified
CNA Linux Linux affected 6709d4b7bc2e079241fdef15d1160581c5261c10 dcab71a7011918f6fdba7adcec02d217dcb84b8d git Not specified
CNA Linux Linux affected dd6ff3f3862709ab1a12566e73b9d6a9b8f6e548 git Not specified
CNA Linux Linux affected b3ad46e155a6d91b36c6e892019a43e3ef3c696d git Not specified
CNA Linux Linux affected e5207c1d69b1a9707615ab6ff9376e59fc096815 git Not specified
CNA Linux Linux affected 5.10.188 5.10.271 semver Not specified
CNA Linux Linux affected 5.15.121 5.15.222 semver Not specified
CNA Linux Linux affected 6.1.39 6.1.189 semver Not specified
CNA Linux Linux affected 5.4.251 5.5 semver Not specified
CNA Linux Linux affected 6.3.13 6.4 semver Not specified
CNA Linux Linux affected 6.4.4 6.5 semver Not specified
CNA Linux Linux affected 6.5 Not specified
CNA Linux Linux unaffected 6.5 semver Not specified
CNA Linux Linux unaffected 5.10.271 5.10.* semver Not specified
CNA Linux Linux unaffected 5.15.222 5.15.* semver Not specified
CNA Linux Linux unaffected 6.1.189 6.1.* semver Not specified
CNA Linux Linux unaffected 6.6.158 6.6.* semver Not specified
CNA Linux Linux unaffected 6.12.112 6.12.* semver Not specified
CNA Linux Linux unaffected 6.18.55 6.18.* semver Not specified
CNA Linux Linux unaffected 7.2.9 7.2.* semver Not specified
CNA Linux Linux unaffected 7.3 * original_commit_for_fix Not specified

References

ReferenceSourceLinkTags
git.kernel.org/stable/c/d8c929e9afdbc33b1876ecb97a517e850449b5bd 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/c40f61a6a413f3eaf028e5fe367fd9749e503ab0 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/25bfa673adc70189c0bc872940421ae59f789cf6 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/dcab71a7011918f6fdba7adcec02d217dcb84b8d 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/841af260ff477f6191872bc3b2e15488615c1827 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/19bcfc2a56d0b82919079b5424c5a9a0ac897dcf 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/2b31d0cc95856c856ada91f943fb14dfdf29a923 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/9ede11e12f965ace97c4e0f606667f24fb41e7e1 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report