CVE-2022-50005: nfc: pn533: Fix use-after-free bugs caused by pn532_cmd_timeout
In the Linux kernel, the following vulnerability has been resolved:
nfc: pn533: Fix use-after-free bugs caused by pn532_cmd_timeout
When the pn532 uart device is detaching, the pn532_uart_remove()
is called. But there are no functions in pn532_uart_remove() that
could delete the cmd_timeout timer, which will cause use-after-free
bugs. The process is shown below:
(thread 1) | (thread 2)
| pn532_uart_send_frame
pn532_uart_remove | mod_timer(&pn532->cmd_timeout,...)
... | (wait a time)
kfree(pn532) //FREE | pn532_cmd_timeout
| pn532_uart_send_frame
| pn532->... //USE
This patch adds del_timer_sync() in pn532_uart_remove() in order to
prevent the use-after-free bugs. What's more, the pn53x_unregister_nfc()
is well synchronized, it sets nfc_dev->shutting_down to true and there
are no syscalls could restart the cmd_timeout timer.
Security readout for executives and security teams
Plain-English summary
This is a Linux kernel bug in the PN533/PN532 NFC UART driver. During device removal, a timer could keep running after memory was freed, creating a use-after-free condition. Business impact is mainly for systems that actually use this NFC hardware or driver; broad server exposure is not established in the supplied sources.
Executive priority
Treat this as a targeted kernel maintenance issue, not a confirmed internet-scale emergency. Prioritize patching where NFC hardware or driver support exists, and include it in normal kernel update governance for other Linux assets.
Technical view
The flaw is a race in pn532_uart_remove(): cmd_timeout was not deleted before kfree(pn532). A later pn532_cmd_timeout path could dereference freed pn532 state through pn532_uart_send_frame. The referenced kernel fix adds del_timer_sync() and relies on pn53x_unregister_nfc() shutdown synchronization to prevent timer restart.
Likely exposure
Exposure appears limited to Linux systems with the PN533/PN532 NFC UART driver and related NFC hardware or functionality present. The source bundle lists Linux kernel versions as affected but does not provide distribution-specific package names, CVSS scoring, or full version-range semantics.
Exploitation context
The supplied sources do not show active exploitation, and KEV status is false. The bug requires a detach/removal timing condition around the NFC UART device and timer handling. No public exploitability details are provided in the bundle.
Researcher notes
Evidence is clear on root cause and upstream fix, but incomplete on severity, attack requirements, and distro impact. Avoid assuming remote exploitability. Focus validation on driver presence, kernel lineage, and whether vendor kernels have backported the stable commits.
Mitigation direction
Update to a vendor Linux kernel containing the referenced stable fixes.
If NFC is unnecessary, disable PN533/PN532 NFC UART support where operationally safe.
Check distribution advisories for backported fixes before relying on upstream version numbers.
Prioritize affected systems with NFC hardware, removable devices, or exposed local access.
Validation and detection
Inventory kernels against the affected versions and vendor security advisories.
Confirm whether PN533/PN532 NFC UART driver support is enabled or loaded.
Verify the deployed kernel includes the del_timer_sync() fix in pn532_uart_remove().
Review hardware inventories for NFC UART devices on managed endpoints and appliances.
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-2022-50005 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.
0CVSS vectors
3Timeline events
0ADP providers
5Source links
Vulnerability timeline
Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.
CVE reservedCVE Program
The CVE ID was reserved by the assigning CNA.
CVE publishedCVE Program
The CVE record was published.
Jun 18, 2025, 11:01 UTC (UTC+00:00)
CVE updatedCVE Program
The CVE record metadata indicates this as the latest update time.