CVE-2024-49874
Severity CVSS v4.0:
Pending analysis
Type:
CWE-416
Use After Free
Publication date:
21/10/2024
Last modified:
14/12/2024
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
i3c: master: svc: Fix use after free vulnerability in svc_i3c_master Driver Due to Race Condition<br />
<br />
In the svc_i3c_master_probe function, &master->hj_work is bound with<br />
svc_i3c_master_hj_work, &master->ibi_work is bound with<br />
svc_i3c_master_ibi_work. And svc_i3c_master_ibi_work can start the<br />
hj_work, svc_i3c_master_irq_handler can start the ibi_work.<br />
<br />
If we remove the module which will call svc_i3c_master_remove to<br />
make cleanup, it will free master->base through i3c_master_unregister<br />
while the work mentioned above will be used. The sequence of operations<br />
that may lead to a UAF bug is as follows:<br />
<br />
CPU0 CPU1<br />
<br />
| svc_i3c_master_hj_work<br />
svc_i3c_master_remove |<br />
i3c_master_unregister(&master->base)|<br />
device_unregister(&master->dev) |<br />
device_release |<br />
//free master->base |<br />
| i3c_master_do_daa(&master->base)<br />
| //use master->base<br />
<br />
Fix it by ensuring that the work is canceled before proceeding with the<br />
cleanup in svc_i3c_master_remove.
Impact
Base Score 3.x
7.00
Severity 3.x
HIGH
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.4 (including) | 6.6.55 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.10.14 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.11 (including) | 6.11.3 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/27b55724d3f781dd6e635e89dc6e2fd78fa81a00
- https://git.kernel.org/stable/c/4318998892bf8fe99f97bea18c37ae7b685af75a
- https://git.kernel.org/stable/c/4ac637122930cc4ab7e2c22e364cf3aaf96b05b1
- https://git.kernel.org/stable/c/56bddf543d4d7ddeff3f87b554ddacfdf086bffe
- https://git.kernel.org/stable/c/61850725779709369c7e907ae8c7c75dc7cec4f3



