CVE-2021-47612: nfc: fix segfault in nfc_genl_dump_devices_done
In the Linux kernel, the following vulnerability has been resolved:
nfc: fix segfault in nfc_genl_dump_devices_done
When kmalloc in nfc_genl_dump_devices() fails then
nfc_genl_dump_devices_done() segfaults as below
KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f]
CPU: 0 PID: 25 Comm: kworker/0:1 Not tainted 5.16.0-rc4-01180-g2a987e65025e-dirty #5
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-6.fc35 04/01/2014
Workqueue: events netlink_sock_destruct_work
RIP: 0010:klist_iter_exit+0x26/0x80
Call Trace:
<TASK>
class_dev_iter_exit+0x15/0x20
nfc_genl_dump_devices_done+0x3b/0x50
genl_lock_done+0x84/0xd0
netlink_sock_destruct+0x8f/0x270
__sk_destruct+0x64/0x3b0
sk_destruct+0xa8/0xd0
__sk_free+0x2e8/0x3d0
sk_free+0x51/0x90
netlink_sock_destruct_work+0x1c/0x20
process_one_work+0x411/0x710
worker_thread+0x6fd/0xa80
Security readout for executives and security teams
Plain-English summary
This is a Linux kernel NFC bug that can trigger a null pointer crash when memory allocation fails during device listing cleanup. The public record does not show active exploitation, CVSS, or complete attacker prerequisites. Treat it mainly as a stability and denial-of-service risk until vendor guidance clarifies impact.
Executive priority
Patch during normal kernel maintenance unless the environment has broad local-user exposure, untrusted workloads, or required NFC services. Escalate priority if a vendor rates the issue higher for your distribution or confirms an easier trigger path.
Technical view
The flaw is in nfc_genl_dump_devices_done(). If kmalloc fails in nfc_genl_dump_devices(), cleanup can call class_dev_iter_exit through an uninitialized or null iterator path, causing a KASAN null-ptr-deref during netlink socket destruction. Kernel stable commits are listed as remediation references.
Likely exposure
Exposure is most relevant to Linux systems running affected kernel versions with NFC kernel functionality present. The source does not establish remote reachability, privilege requirements, or whether NFC hardware must be present. Distribution kernels may have backported fixes, so version-only checks can be misleading.
Exploitation context
No CISA KEV listing is provided and the source bundle gives no evidence of active exploitation or public weaponization. The supplied trace shows a crash condition under allocation failure, not a complete exploit path. Practical exploitation likelihood is therefore uncertain from these sources.
Researcher notes
The public record is sparse: no CVSS, CWE, exploit status, or detailed preconditions are supplied. Analysis should focus on validating affected kernel lines, the NFC generic netlink path, vendor backports, and whether the crash is user-triggerable in the target configuration.
Mitigation direction
Apply vendor or distribution kernel updates that include the referenced stable fixes.
Check vendor advisories before assuming upstream version numbers reflect backported patch status.
Reduce unnecessary NFC kernel exposure where operationally feasible.
Prioritize systems where local users or workloads can interact with NFC generic netlink paths.
Validation and detection
Inventory Linux kernel versions and distribution patch levels across affected assets.
Confirm whether the referenced stable commits are present or backported by the vendor.
Review kernel configuration and loaded modules for NFC support.
Check kernel logs for null pointer dereferences involving nfc_genl_dump_devices_done.
Track CVE updates for CVSS, affected-version clarification, or vendor-specific guidance.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2021-47612 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.