CVE-2022-50005

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-50005
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50005.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-50005
Downstream
Related
Published
2025-06-18T11:15:28Z
Modified
2025-08-09T19:01:28Z
Summary
[none]
Details

In the Linux kernel, the following vulnerability has been resolved:

nfc: pn533: Fix use-after-free bugs caused by pn532cmdtimeout

When the pn532 uart device is detaching, the pn532uartremove() is called. But there are no functions in pn532uartremove() 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

pn532uartremove | modtimer(&pn532->cmdtimeout,...) ... | (wait a time) kfree(pn532) //FREE | pn532cmdtimeout | pn532uartsend_frame | pn532->... //USE

This patch adds deltimersync() in pn532uartremove() in order to prevent the use-after-free bugs. What's more, the pn53xunregisternfc() is well synchronized, it sets nfcdev->shuttingdown to true and there are no syscalls could restart the cmd_timeout timer.

References

Affected packages