In the Linux kernel, the following vulnerability has been resolved:
net: seeq: Fix use after free vulnerability in ether3 Driver Due to Race Condition
In the ether3probe function, a timer is initialized with a callback function ether3ledoff, bound to &prev(dev)->timer. Once the timer is started, there is a risk of a race condition if the module or device is removed, triggering the ether3_remove function to perform cleanup. The sequence of operations that may lead to a UAF bug is as follows:
CPU0 CPU1
| ether3_ledoff
ether3remove | freenetdev(dev); | putdevic | kfree(dev); | | ether3outw(priv(dev)->regs.config2 |= CFG2CTRLO, REGCONFIG2); | // use dev
Fix it by ensuring that the timer is canceled before proceeding with the cleanup in ether3_remove.
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/47xxx/CVE-2024-47747.json"
}"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-47747.json"
[
{
"signature_version": "v1",
"target": {
"file": "drivers/net/ethernet/seeq/ether3.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@516dbc6d16637430808c39568cbb6b841d32b55b",
"deprecated": false,
"digest": {
"line_hashes": [
"18646800347217680704618724302081210157",
"312027769429363647493798212514957084343",
"32887973692718012210120133654270572164",
"297022766715774230182230793009004754868",
"4341709699908002314318176831233075412"
],
"threshold": 0.9
},
"id": "CVE-2024-47747-49e4c4ec",
"signature_type": "Line"
},
{
"signature_version": "v1",
"target": {
"file": "drivers/net/ethernet/seeq/ether3.c",
"function": "ether3_remove"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@516dbc6d16637430808c39568cbb6b841d32b55b",
"deprecated": false,
"digest": {
"function_hash": "44164687017843005500425748003170131727",
"length": 165.0
},
"id": "CVE-2024-47747-926035d6",
"signature_type": "Function"
}
]