Lucene search

K
cve416baaa9-dc9f-4396-8d5f-8c081fb06d67CVE-2021-46941
HistoryFeb 27, 2024 - 7:04 p.m.

CVE-2021-46941

2024-02-2719:04:05
416baaa9-dc9f-4396-8d5f-8c081fb06d67
web.nvd.nist.gov
633
linux
kernel
usb
dwc3
vulnerability
cve-2021-46941
security
patch
update

5.5 Medium

CVSS3

Attack Vector

LOCAL

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

HIGH

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

6.3 Medium

AI Score

Confidence

Low

0.0004 Low

EPSS

Percentile

5.1%

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

usb: dwc3: core: Do core softreset when switch mode

According to the programming guide, to switch mode for DRD controller,
the driver needs to do the following.

To switch from device to host:

  1. Reset controller with GCTL.CoreSoftReset
  2. Set GCTL.PrtCapDir(host mode)
  3. Reset the host with USBCMD.HCRESET
  4. Then follow up with the initializing host registers sequence

To switch from host to device:

  1. Reset controller with GCTL.CoreSoftReset
  2. Set GCTL.PrtCapDir(device mode)
  3. Reset the device with DCTL.CSftRst
  4. Then follow up with the initializing registers sequence

Currently we’re missing step 1) to do GCTL.CoreSoftReset and step 3) of
switching from host to device. John Stult reported a lockup issue seen
with HiKey960 platform without these steps[1]. Similar issue is observed
with Ferry’s testing platform[2].

So, apply the required steps along with some fixes to Yu Chen’s and John
Stultz’s version. The main fixes to their versions are the missing wait
for clocks synchronization before clearing GCTL.CoreSoftReset and only
apply DCTL.CSftRst when switching from host to device.

[1] https://lore.kernel.org/linux-usb/[email protected]/
[2] https://lore.kernel.org/linux-usb/[email protected]/

Affected configurations

Vulners
NVD
Node
linuxlinux_kernelRange4.125.10.36
OR
linuxlinux_kernelRange5.11.05.11.20
OR
linuxlinux_kernelRange5.12.05.12.3
OR
linuxlinux_kernelRange5.13.0
VendorProductVersionCPE
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*

CNA Affected

[
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "unaffected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "drivers/usb/dwc3/core.c",
      "drivers/usb/dwc3/core.h"
    ],
    "versions": [
      {
        "version": "41ce1456e1db",
        "lessThan": "fce7bbcd07d5",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "41ce1456e1db",
        "lessThan": "800f58217626",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "41ce1456e1db",
        "lessThan": "1c10fd60c859",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "41ce1456e1db",
        "lessThan": "f88359e1588b",
        "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/dwc3/core.c",
      "drivers/usb/dwc3/core.h"
    ],
    "versions": [
      {
        "version": "4.12",
        "status": "affected"
      },
      {
        "version": "0",
        "lessThan": "4.12",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.10.36",
        "lessThanOrEqual": "5.10.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.11.20",
        "lessThanOrEqual": "5.11.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.12.3",
        "lessThanOrEqual": "5.12.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.13",
        "lessThanOrEqual": "*",
        "status": "unaffected",
        "versionType": "original_commit_for_fix"
      }
    ]
  }
]

5.5 Medium

CVSS3

Attack Vector

LOCAL

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

HIGH

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

6.3 Medium

AI Score

Confidence

Low

0.0004 Low

EPSS

Percentile

5.1%