CVE-2024-49874: i3c: master: svc: Fix use after free vulnerability in svc_i3c_master Driver Due to Race Condition
In the Linux kernel, the following vulnerability has been resolved:
i3c: master: svc: Fix use after free vulnerability in svci3cmaster Driver Due to Race Condition
In the svci3cmasterprobe function, &master->hjwork is bound with svci3cmasterhjwork, &master->ibiwork is bound with svci3cmasteribiwork. And svci3cmasteribiwork can start the hjwork, svci3cmasterirqhandler can start the ibiwork.
If we remove the module which will call svci3cmasterremove to make cleanup, it will free master->base through i3cmasterunregister while the work mentioned above will be used. The sequence of operations that may lead to a UAF bug is as follows:
CPU0 CPU1
| svci3cmasterhjwork svci3cmasterremove | i3cmasterunregister(&master->base)| deviceunregister(&master->dev) | devicerelease | //free master->base | | i3cmasterdodaa(&master->base) | //use master->base
Fix it by ensuring that the work is canceled before proceeding with the cleanup in svci3cmasterremove.
Other sources
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.22-1Fixed in 6.12.25-1
Event History
Frequently Asked Questions
What is the severity of CVE-2024-49874?
CVE-2024-49874 is classified as a medium-severity vulnerability due to its potential exploitation in the Linux kernel.
How do I fix CVE-2024-49874?
To fix CVE-2024-49874, update the Linux kernel to a version that includes the patch for this vulnerability.
Which Linux kernel versions are affected by CVE-2024-49874?
CVE-2024-49874 affects multiple Linux kernel versions between 6.4 and 6.6.55, 6.7 and 6.10.14, and 6.11 and 6.11.3.
What components are involved in CVE-2024-49874?
CVE-2024-49874 involves the svc_i3c_master driver and is related to a use-after-free condition caused by a race condition.
Is CVE-2024-49874 present in Debian packages?
Yes, CVE-2024-49874 is present in certain Debian packages, specifically versions 5.10.223-1, 5.10.226-1, 6.1.123-1, and others.