Lucene search

K
cvelistLinuxCVELIST:CVE-2024-26934
HistoryMay 01, 2024 - 5:17 a.m.

CVE-2024-26934 USB: core: Fix deadlock in usb_deauthorize_interface()

2024-05-0105:17:27
Linux
www.cve.org
1
usb
deadlock
linux kernel
vulnerability
sysfs
attribute callback

7.7 High

AI Score

Confidence

High

0.0004 Low

EPSS

Percentile

5.1%

In the Linux kernel, the following vulnerability has been resolved:

USB: core: Fix deadlock in usb_deauthorize_interface()

Among the attribute file callback routines in
drivers/usb/core/sysfs.c, the interface_authorized_store() function is
the only one which acquires a device lock on an ancestor device: It
calls usb_deauthorize_interface(), which locks the interface’s parent
USB device.

The will lead to deadlock if another process already owns that lock
and tries to remove the interface, whether through a configuration
change or because the device has been disconnected. As part of the
removal procedure, device_del() waits for all ongoing sysfs attribute
callbacks to complete. But usb_deauthorize_interface() can’t complete
until the device lock has been released, and the lock won’t be
released until the removal has finished.

The mechanism provided by sysfs to prevent this kind of deadlock is
to use the sysfs_break_active_protection() function, which tells sysfs
not to wait for the attribute callback.

Reported-and-tested by: Yue Sun <[email protected]>
Reported by: xingwei lee <[email protected]>

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/sysfs.c"
    ],
    "versions": [
      {
        "version": "310d2b4124c0",
        "lessThan": "8cbdd324b415",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "310d2b4124c0",
        "lessThan": "12d6a5681a0a",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "310d2b4124c0",
        "lessThan": "e451709573f8",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "310d2b4124c0",
        "lessThan": "1b175bc579f4",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "310d2b4124c0",
        "lessThan": "ab062fa3dc69",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "310d2b4124c0",
        "lessThan": "122a06f1068b",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "310d2b4124c0",
        "lessThan": "dbdf66250d2d",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "310d2b4124c0",
        "lessThan": "07acf979da33",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "310d2b4124c0",
        "lessThan": "80ba43e9f799",
        "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/sysfs.c"
    ],
    "versions": [
      {
        "version": "4.4",
        "status": "affected"
      },
      {
        "version": "0",
        "lessThan": "4.4",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "4.19.312",
        "lessThanOrEqual": "4.19.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.4.274",
        "lessThanOrEqual": "5.4.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.10.215",
        "lessThanOrEqual": "5.10.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.15.154",
        "lessThanOrEqual": "5.15.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.1.84",
        "lessThanOrEqual": "6.1.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.6.24",
        "lessThanOrEqual": "6.6.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.7.12",
        "lessThanOrEqual": "6.7.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.8.3",
        "lessThanOrEqual": "6.8.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.9",
        "lessThanOrEqual": "*",
        "status": "unaffected",
        "versionType": "original_commit_for_fix"
      }
    ]
  }
]

7.7 High

AI Score

Confidence

High

0.0004 Low

EPSS

Percentile

5.1%