Lucene search

K
cvelistLinuxCVELIST:CVE-2024-36896
HistoryMay 30, 2024 - 3:29 p.m.

CVE-2024-36896 USB: core: Fix access violation during port device removal

2024-05-3015:29:00
Linux
www.cve.org
6
linux kernel
usb
vulnerability
fix
access violation
port device
removal
bug
kasan
syzkaller
port.c:disable_store
usb_hub_to_struct_hub
hub
intfdev
disable_show

AI Score

6.5

Confidence

Low

EPSS

0

Percentile

15.5%

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:disable_store():
usb_hub_to_struct_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.

CNA Affected

[
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "unaffected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "drivers/usb/core/port.c"
    ],
    "versions": [
      {
        "version": "f061f43d7418",
        "lessThan": "5f1d68ef5dda",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "f061f43d7418",
        "lessThan": "63533549ff53",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "f061f43d7418",
        "lessThan": "6119ef6517ce",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "f061f43d7418",
        "lessThan": "a4b46d450c49",
        "status": "affected",
        "versionType": "git"
      }
    ]
  },
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "affected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "drivers/usb/core/port.c"
    ],
    "versions": [
      {
        "version": "6.0",
        "status": "affected"
      },
      {
        "version": "0",
        "lessThan": "6.0",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.1.91",
        "lessThanOrEqual": "6.1.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.6.31",
        "lessThanOrEqual": "6.6.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.8.10",
        "lessThanOrEqual": "6.8.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.9",
        "lessThanOrEqual": "*",
        "status": "unaffected",
        "versionType": "original_commit_for_fix"
      }
    ]
  }
]