CVE-2024-50059

Severity CVSS v4.0:
Pending analysis
Type:
CWE-416 Use After Free
Publication date:
21/10/2024
Last modified:
03/11/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> ntb: ntb_hw_switchtec: Fix use after free vulnerability in switchtec_ntb_remove due to race condition<br /> <br /> In the switchtec_ntb_add function, it can call switchtec_ntb_init_sndev<br /> function, then &amp;sndev-&gt;check_link_status_work is bound with<br /> check_link_status_work. switchtec_ntb_link_notification may be called<br /> to start the work.<br /> <br /> If we remove the module which will call switchtec_ntb_remove to make<br /> cleanup, it will free sndev through kfree(sndev), while the work<br /> mentioned above will be used. The sequence of operations that may lead<br /> to a UAF bug is as follows:<br /> <br /> CPU0 CPU1<br /> <br /> | check_link_status_work<br /> switchtec_ntb_remove |<br /> kfree(sndev); |<br /> | if (sndev-&gt;link_force_down)<br /> | // use sndev<br /> <br /> Fix it by ensuring that the work is canceled before proceeding with<br /> the cleanup in switchtec_ntb_remove.

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.10.227 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.11 (including) 5.15.168 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.16 (including) 6.1.113 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.2 (including) 6.6.57 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.7 (including) 6.11.4 (excluding)