In the Linux kernel, the following vulnerability has been resolved:
USB: core: Fix access violation during port device removal
Testing with KASAN and syzkaller revealed a bug in port.c:disablestore(): usbhubtostruct_hub() can return NULL if the hub that the port belongs to is concurrently removed, but the function does not check for this possibility before dereferencing the returned value.
It turns out that the first dereference is unnecessary, since hub->intfdev is the parent of the port device, so it can be changed easily. Adding a check for hub == NULL prevents further problems.
The same bug exists in the disable_show() routine, and it can be fixed the same way.
[
{
"id": "CVE-2024-36896-1e04a786",
"target": {
"file": "drivers/usb/core/port.c"
},
"digest": {
"line_hashes": [
"169883757567198094698236684475796758301",
"222058828940646139094243305475453056716",
"149916037562659817003933783169467535909",
"173677136519895368174081077929945143489",
"124124045036899436569161070295595321865",
"48765797176060082108205280052865887545",
"155161784940811531557243725177255250650",
"243987659226637505323556708391667752391",
"161629559358935872697663485965859571139",
"169883757567198094698236684475796758301",
"222058828940646139094243305475453056716",
"82654626118173529337025486078148340522",
"240926079715357974461884545839157582378",
"283631919912486447434976585744667170741",
"289216972937436973057000530244814516984",
"228963457147388719720204705480622862629",
"259246829250205567076252755403902325409"
],
"threshold": 0.9
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@63533549ff53d24daf47c443dbd43c308afc3434",
"signature_type": "Line"
},
{
"id": "CVE-2024-36896-68d89edc",
"target": {
"function": "disable_show",
"file": "drivers/usb/core/port.c"
},
"digest": {
"length": 873.0,
"function_hash": "81019646844778198377840961890149799271"
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5f1d68ef5ddac27c6b997adccd1c339cef1e6848",
"signature_type": "Function"
},
{
"id": "CVE-2024-36896-70eca337",
"target": {
"function": "disable_show",
"file": "drivers/usb/core/port.c"
},
"digest": {
"length": 873.0,
"function_hash": "81019646844778198377840961890149799271"
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a4b46d450c49f32e9d4247b421e58083fde304ce",
"signature_type": "Function"
},
{
"id": "CVE-2024-36896-93ac14e3",
"target": {
"function": "disable_store",
"file": "drivers/usb/core/port.c"
},
"digest": {
"length": 1072.0,
"function_hash": "246346263945690211599174311130827990780"
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@63533549ff53d24daf47c443dbd43c308afc3434",
"signature_type": "Function"
},
{
"id": "CVE-2024-36896-9f60d850",
"target": {
"file": "drivers/usb/core/port.c"
},
"digest": {
"line_hashes": [
"169883757567198094698236684475796758301",
"222058828940646139094243305475453056716",
"149916037562659817003933783169467535909",
"173677136519895368174081077929945143489",
"124124045036899436569161070295595321865",
"48765797176060082108205280052865887545",
"155161784940811531557243725177255250650",
"243987659226637505323556708391667752391",
"161629559358935872697663485965859571139",
"169883757567198094698236684475796758301",
"222058828940646139094243305475453056716",
"82654626118173529337025486078148340522",
"240926079715357974461884545839157582378",
"283631919912486447434976585744667170741",
"289216972937436973057000530244814516984",
"228963457147388719720204705480622862629",
"259246829250205567076252755403902325409"
],
"threshold": 0.9
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6119ef6517ce501fc548154691abdaf1f954a277",
"signature_type": "Line"
},
{
"id": "CVE-2024-36896-a8891846",
"target": {
"file": "drivers/usb/core/port.c"
},
"digest": {
"line_hashes": [
"169883757567198094698236684475796758301",
"222058828940646139094243305475453056716",
"149916037562659817003933783169467535909",
"173677136519895368174081077929945143489",
"124124045036899436569161070295595321865",
"48765797176060082108205280052865887545",
"155161784940811531557243725177255250650",
"243987659226637505323556708391667752391",
"161629559358935872697663485965859571139",
"169883757567198094698236684475796758301",
"222058828940646139094243305475453056716",
"82654626118173529337025486078148340522",
"240926079715357974461884545839157582378",
"283631919912486447434976585744667170741",
"289216972937436973057000530244814516984",
"228963457147388719720204705480622862629",
"259246829250205567076252755403902325409"
],
"threshold": 0.9
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a4b46d450c49f32e9d4247b421e58083fde304ce",
"signature_type": "Line"
},
{
"id": "CVE-2024-36896-a9c50371",
"target": {
"function": "disable_store",
"file": "drivers/usb/core/port.c"
},
"digest": {
"length": 1072.0,
"function_hash": "246346263945690211599174311130827990780"
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a4b46d450c49f32e9d4247b421e58083fde304ce",
"signature_type": "Function"
},
{
"id": "CVE-2024-36896-b0c5c04e",
"target": {
"function": "disable_store",
"file": "drivers/usb/core/port.c"
},
"digest": {
"length": 1072.0,
"function_hash": "246346263945690211599174311130827990780"
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5f1d68ef5ddac27c6b997adccd1c339cef1e6848",
"signature_type": "Function"
},
{
"id": "CVE-2024-36896-b8fd6a34",
"target": {
"function": "disable_show",
"file": "drivers/usb/core/port.c"
},
"digest": {
"length": 873.0,
"function_hash": "81019646844778198377840961890149799271"
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6119ef6517ce501fc548154691abdaf1f954a277",
"signature_type": "Function"
},
{
"id": "CVE-2024-36896-bbd33e44",
"target": {
"function": "disable_store",
"file": "drivers/usb/core/port.c"
},
"digest": {
"length": 1072.0,
"function_hash": "246346263945690211599174311130827990780"
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6119ef6517ce501fc548154691abdaf1f954a277",
"signature_type": "Function"
},
{
"id": "CVE-2024-36896-e379c75d",
"target": {
"file": "drivers/usb/core/port.c"
},
"digest": {
"line_hashes": [
"169883757567198094698236684475796758301",
"222058828940646139094243305475453056716",
"149916037562659817003933783169467535909",
"173677136519895368174081077929945143489",
"124124045036899436569161070295595321865",
"48765797176060082108205280052865887545",
"155161784940811531557243725177255250650",
"243987659226637505323556708391667752391",
"161629559358935872697663485965859571139",
"169883757567198094698236684475796758301",
"222058828940646139094243305475453056716",
"82654626118173529337025486078148340522",
"240926079715357974461884545839157582378",
"283631919912486447434976585744667170741",
"124908248485857341775804522982959793983",
"257303509926173403337338521068036731476",
"15292692320452309746565586431486387735"
],
"threshold": 0.9
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5f1d68ef5ddac27c6b997adccd1c339cef1e6848",
"signature_type": "Line"
},
{
"id": "CVE-2024-36896-fc9abe31",
"target": {
"function": "disable_show",
"file": "drivers/usb/core/port.c"
},
"digest": {
"length": 873.0,
"function_hash": "81019646844778198377840961890149799271"
},
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@63533549ff53d24daf47c443dbd43c308afc3434",
"signature_type": "Function"
}
]