CVE-2021-47267
"Linux Kernel USB Gadget NULL Pointer Dereference Vulnerability"
Description
In the Linux kernel, the following vulnerability has been resolved: usb: fix various gadget panics on 10gbps cabling usb_assign_descriptors() is called with 5 parameters, the last 4 of which are the usb_descriptor_header for: full-speed (USB1.1 - 12Mbps [including USB1.0 low-speed @ 1.5Mbps), high-speed (USB2.0 - 480Mbps), super-speed (USB3.0 - 5Gbps), super-speed-plus (USB3.1 - 10Gbps). The differences between full/high/super-speed descriptors are usually substantial (due to changes in the maximum usb block size from 64 to 512 to 1024 bytes and other differences in the specs), while the difference between 5 and 10Gbps descriptors may be as little as nothing (in many cases the same tuning is simply good enough). However if a gadget driver calls usb_assign_descriptors() with a NULL descriptor for super-speed-plus and is then used on a max 10gbps configuration, the kernel will crash with a null pointer dereference, when a 10gbps capable device port + cable + host port combination shows up. (This wouldn't happen if the gadget max-speed was set to 5gbps, but it of course defaults to the maximum, and there's no real reason to artificially limit it) The fix is to simply use the 5gbps descriptor as the 10gbps descriptor, if a 10gbps descriptor wasn't provided. Obviously this won't fix the problem if the 5gbps descriptor is also NULL, but such cases can't be so trivially solved (and any such gadgets are unlikely to be used with USB3 ports any way).
INFO
Published Date :
May 21, 2024, 3:15 p.m.
Last Modified :
April 4, 2025, 2:30 p.m.
Source :
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Remotely Exploitable :
Yes !
Impact Score :
3.4
Exploitability Score :
2.8
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2021-47267
.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2021-47267
vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2021-47267
vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
Initial Analysis by [email protected]
Apr. 04, 2025
Action Type Old Value New Value Added CWE CWE-476 Added CPE Configuration OR *cpe:2.3:o:linux:linux_kernel:5.13:rc1:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:5.13:rc2:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:5.13:rc3:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:5.13:rc4:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:5.13:rc5:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.11 up to (excluding) 5.12.11 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions up to (excluding) 4.9.273 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 4.10 up to (excluding) 4.14.237 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 4.15 up to (excluding) 4.19.195 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 4.20 up to (excluding) 5.4.126 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.5 up to (excluding) 5.10.44 Added Reference Type CVE: https://git.kernel.org/stable/c/032e288097a553db5653af552dd8035cd2a0ba96 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/032e288097a553db5653af552dd8035cd2a0ba96 Types: Patch Added Reference Type CVE: https://git.kernel.org/stable/c/45f9a2fe737dc0a5df270787f2231aee8985cd59 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/45f9a2fe737dc0a5df270787f2231aee8985cd59 Types: Patch Added Reference Type CVE: https://git.kernel.org/stable/c/5ef23506695b01d5d56a13a092a97f2478069d75 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/5ef23506695b01d5d56a13a092a97f2478069d75 Types: Patch Added Reference Type CVE: https://git.kernel.org/stable/c/70cd19cb5bd94bbb5bacfc9c1e4ee0071699a604 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/70cd19cb5bd94bbb5bacfc9c1e4ee0071699a604 Types: Patch Added Reference Type CVE: https://git.kernel.org/stable/c/b972eff874637402ddc4a7dd11fb22538a0b6d28 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/b972eff874637402ddc4a7dd11fb22538a0b6d28 Types: Patch Added Reference Type CVE: https://git.kernel.org/stable/c/ca6bc277430d90375452b60b047763a090b7673e Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/ca6bc277430d90375452b60b047763a090b7673e Types: Patch Added Reference Type CVE: https://git.kernel.org/stable/c/fd24be23abf3e94260be0f00bb42c7e91d495f87 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/fd24be23abf3e94260be0f00bb42c7e91d495f87 Types: Patch -
CVE Modified by af854a3a-2127-422b-91ae-364da2661108
Nov. 21, 2024
Action Type Old Value New Value Added Reference https://git.kernel.org/stable/c/032e288097a553db5653af552dd8035cd2a0ba96 Added Reference https://git.kernel.org/stable/c/45f9a2fe737dc0a5df270787f2231aee8985cd59 Added Reference https://git.kernel.org/stable/c/5ef23506695b01d5d56a13a092a97f2478069d75 Added Reference https://git.kernel.org/stable/c/70cd19cb5bd94bbb5bacfc9c1e4ee0071699a604 Added Reference https://git.kernel.org/stable/c/b972eff874637402ddc4a7dd11fb22538a0b6d28 Added Reference https://git.kernel.org/stable/c/ca6bc277430d90375452b60b047763a090b7673e Added Reference https://git.kernel.org/stable/c/fd24be23abf3e94260be0f00bb42c7e91d495f87 -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Nov. 01, 2024
Action Type Old Value New Value Added CVSS V3.1 CISA-ADP AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
May. 28, 2024
Action Type Old Value New Value -
CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
May. 21, 2024
Action Type Old Value New Value Added Description In the Linux kernel, the following vulnerability has been resolved: usb: fix various gadget panics on 10gbps cabling usb_assign_descriptors() is called with 5 parameters, the last 4 of which are the usb_descriptor_header for: full-speed (USB1.1 - 12Mbps [including USB1.0 low-speed @ 1.5Mbps), high-speed (USB2.0 - 480Mbps), super-speed (USB3.0 - 5Gbps), super-speed-plus (USB3.1 - 10Gbps). The differences between full/high/super-speed descriptors are usually substantial (due to changes in the maximum usb block size from 64 to 512 to 1024 bytes and other differences in the specs), while the difference between 5 and 10Gbps descriptors may be as little as nothing (in many cases the same tuning is simply good enough). However if a gadget driver calls usb_assign_descriptors() with a NULL descriptor for super-speed-plus and is then used on a max 10gbps configuration, the kernel will crash with a null pointer dereference, when a 10gbps capable device port + cable + host port combination shows up. (This wouldn't happen if the gadget max-speed was set to 5gbps, but it of course defaults to the maximum, and there's no real reason to artificially limit it) The fix is to simply use the 5gbps descriptor as the 10gbps descriptor, if a 10gbps descriptor wasn't provided. Obviously this won't fix the problem if the 5gbps descriptor is also NULL, but such cases can't be so trivially solved (and any such gadgets are unlikely to be used with USB3 ports any way). Added Reference kernel.org https://git.kernel.org/stable/c/fd24be23abf3e94260be0f00bb42c7e91d495f87 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/70cd19cb5bd94bbb5bacfc9c1e4ee0071699a604 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/45f9a2fe737dc0a5df270787f2231aee8985cd59 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/5ef23506695b01d5d56a13a092a97f2478069d75 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/b972eff874637402ddc4a7dd11fb22538a0b6d28 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/ca6bc277430d90375452b60b047763a090b7673e [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/032e288097a553db5653af552dd8035cd2a0ba96 [No types assigned]
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2021-47267
is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2021-47267
weaknesses.