In the Linux kernel, the following vulnerability has been resolved:
Input: powermate - fix use-after-free in powermateconfigcomplete
syzbot has found a use-after-free bug [1] in the powermate driver. This happens when the device is disconnected, which leads to a memory free from the powermate_device struct. When an asynchronous control message completes after the kfree and its callback is invoked, the lock does not exist anymore and hence the bug.
Use usbkillurb() on pm->config to cancel any in-progress requests upon device disconnection.
[1] https://syzkaller.appspot.com/bug?extid=0434ac83f907a1dbdd1e
[
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/input/misc/powermate.c"
},
"digest": {
"line_hashes": [
"90002663127465550369441992902562606673",
"226002541277720931130866924026298827311",
"239045936181563480068127692863284400367",
"168717051639774137708156314102949624401"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cd2fbfd8b922b7fdd50732e47d797754ab59cb06",
"signature_version": "v1",
"id": "CVE-2023-52475-1f088c24"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/input/misc/powermate.c",
"function": "powermate_disconnect"
},
"digest": {
"length": 318.0,
"function_hash": "140576861689047512552813254540322666976"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cd2fbfd8b922b7fdd50732e47d797754ab59cb06",
"signature_version": "v1",
"id": "CVE-2023-52475-26773e03"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/input/misc/powermate.c",
"function": "powermate_disconnect"
},
"digest": {
"length": 318.0,
"function_hash": "140576861689047512552813254540322666976"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@67cace72606baf1758fd60feb358f4c6be92e1cc",
"signature_version": "v1",
"id": "CVE-2023-52475-30f454d4"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/input/misc/powermate.c",
"function": "powermate_disconnect"
},
"digest": {
"length": 318.0,
"function_hash": "140576861689047512552813254540322666976"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6a4a396386404e62fb59bc3bde48871a64a82b4f",
"signature_version": "v1",
"id": "CVE-2023-52475-3893bbd8"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/input/misc/powermate.c"
},
"digest": {
"line_hashes": [
"90002663127465550369441992902562606673",
"226002541277720931130866924026298827311",
"239045936181563480068127692863284400367",
"168717051639774137708156314102949624401"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6a4a396386404e62fb59bc3bde48871a64a82b4f",
"signature_version": "v1",
"id": "CVE-2023-52475-6617cddb"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/input/misc/powermate.c"
},
"digest": {
"line_hashes": [
"90002663127465550369441992902562606673",
"226002541277720931130866924026298827311",
"239045936181563480068127692863284400367",
"168717051639774137708156314102949624401"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@67cace72606baf1758fd60feb358f4c6be92e1cc",
"signature_version": "v1",
"id": "CVE-2023-52475-7960517a"
}
]