{"id":"CVE-2022-50005","published":"2025-06-18T11:01:10Z","modified":"2026-05-11T19:10:53Z","title":"nfc: pn533: Fix use-after-free bugs caused by pn532_cmd_timeout","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nnfc: pn533: Fix use-after-free bugs caused by pn532_cmd_timeout\n\nWhen the pn532 uart device is detaching, the pn532_uart_remove()\nis called. But there are no functions in pn532_uart_remove() that\ncould delete the cmd_timeout timer, which will cause use-after-free\nbugs. The process is shown below:\n\n    (thread 1)                  |        (thread 2)\n                                |  pn532_uart_send_frame\npn532_uart_remove               |    mod_timer(&pn532->cmd_timeout,...)\n  ...                           |    (wait a time)\n  kfree(pn532) //FREE           |    pn532_cmd_timeout\n                                |      pn532_uart_send_frame\n                                |        pn532->... //USE\n\nThis patch adds del_timer_sync() in pn532_uart_remove() in order to\nprevent the use-after-free bugs. What's more, the pn53x_unregister_nfc()\nis well synchronized, it sets nfc_dev->shutting_down to true and there\nare no syscalls could restart the cmd_timeout timer.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.00262,"percentile":0.18215,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/50403ee6daddf0d7a14e9d3b51a377c39a08ec8c","tags":[]},{"url":"https://git.kernel.org/stable/c/9c34c33893db7a80d0e4b55c23d3b65e29609cfb","tags":[]},{"url":"https://git.kernel.org/stable/c/2c71f5d55a86fd5969428abf525c1ae6b1c7b0f5","tags":[]},{"url":"https://git.kernel.org/stable/c/f1e941dbf80a9b8bab0bffbc4cbe41cc7f4c6fb6","tags":[]}],"priority":{"score":3.6,"factors":[{"name":"EPSS percentile","points":3.64}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= c656aa4c27b17a8c70da223ed5ab42145800d6b5, < 50403ee6daddf0d7a14e9d3b51a377c39a08ec8c",">= c656aa4c27b17a8c70da223ed5ab42145800d6b5, < 9c34c33893db7a80d0e4b55c23d3b65e29609cfb",">= c656aa4c27b17a8c70da223ed5ab42145800d6b5, < 2c71f5d55a86fd5969428abf525c1ae6b1c7b0f5",">= c656aa4c27b17a8c70da223ed5ab42145800d6b5, < f1e941dbf80a9b8bab0bffbc4cbe41cc7f4c6fb6"]},{"vendor":"Linux","product":"Linux","versions":["5.5"]}],"euvd":{"id":"EUVD-2022-55284","exploited":false,"provenance":"source"}}