CVE-2022-50005
Severity CVSS v4.0:
Pending analysis
Type:
CWE-416
Use After Free
Publication date:
18/06/2025
Last modified:
14/11/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
nfc: pn533: Fix use-after-free bugs caused by pn532_cmd_timeout<br />
<br />
When the pn532 uart device is detaching, the pn532_uart_remove()<br />
is called. But there are no functions in pn532_uart_remove() that<br />
could delete the cmd_timeout timer, which will cause use-after-free<br />
bugs. The process is shown below:<br />
<br />
(thread 1) | (thread 2)<br />
| pn532_uart_send_frame<br />
pn532_uart_remove | mod_timer(&pn532->cmd_timeout,...)<br />
... | (wait a time)<br />
kfree(pn532) //FREE | pn532_cmd_timeout<br />
| pn532_uart_send_frame<br />
| pn532->... //USE<br />
<br />
This patch adds del_timer_sync() in pn532_uart_remove() in order to<br />
prevent the use-after-free bugs. What&#39;s more, the pn53x_unregister_nfc()<br />
is well synchronized, it sets nfc_dev->shutting_down to true and there<br />
are no syscalls could restart the cmd_timeout timer.
Impact
Base Score 3.x
7.80
Severity 3.x
HIGH
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.5 (including) | 5.10.140 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.15.64 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 5.19.6 (excluding) |
| cpe:2.3:o:linux:linux_kernel:6.0:rc1:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.0:rc2:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page



