CVE-2021-46980·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: usb: typec: ucsi: Retrieve all the PDOs instead of just the first 4 commit 4dbc6a4ef06d ("usb: typec: ucsi: save power data objects in PD mode") introduced retrieval of the PDOs when connected to a PD-capable source. But only the first 4 PDOs are received since that is the maximum number that can be fetched at a time given the MESSAGE_IN length limitation (16 bytes). However, as per the PD spec a connected source may advertise up to a maximum of 7 PDOs. If such a source is connected it's possible the PPM could have negotiated a power contract with one of the PDOs at index greater than 4, and would be reflected in the request data object's (RDO) object position field. This would result in an out-of-bounds access when the rdo_index() is used to index into the src_pdos array in ucsi_psy_get_voltage_now(). With the help of the UBSAN -fsanitize=array-bounds checker enabled this exact issue is revealed when connecting to a PD source adapter that advertise 5 PDOs and the PPM enters a contract having selected the 5th one. [ 151.545106][ T70] Unexpected kernel BRK exception at EL1 [ 151.545112][ T70] Internal error: BRK handler: f2005512 [#1] PREEMPT SMP ... [ 151.545499][ T70] pc : ucsi_psy_get_prop+0x208/0x20c [ 151.545507][ T70] lr : power_supply_show_property+0xc0/0x328 ... [ 151.545542][ T70] Call trace: [ 151.545544][ T70] ucsi_psy_get_prop+0x208/0x20c [ 151.545546][ T70] power_supply_uevent+0x1a4/0x2f0 [ 151.545550][ T70] dev_uevent+0x200/0x384 [ 151.545555][ T70] kobject_uevent_env+0x1d4/0x7e8 [ 151.545557][ T70] power_supply_changed_work+0x174/0x31c [ 151.545562][ T70] process_one_work+0x244/0x6f0 [ 151.545564][ T70] worker_thread+0x3e0/0xa64 We can resolve this by instead retrieving and storing up to the maximum of 7 PDOs in the con->src_pdos array. This would involve two calls to the GET_PDOS command.
- Severity
- high
- Software
- Kernel
- Fixed in
- 5.12.5
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at <0.1% — higher than 12% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Read the two together. CVE-2021-46980 scores 7.1 on CVSS, so a successful attack would be serious — but at <0.1%, almost nobody is currently attempting it. That is a different situation from a flaw under mass exploitation, and it is usually the difference between patching on your next maintenance window and patching tonight.
Affected versions
From: 5.12
Until: 5.12.5
Fixed in: 5.12.5
How to fix this CVE
Update your Linux kernel to version 5.12.5 or later to resolve this USB Type-C Power Delivery vulnerability. The issue occurs when the UCSI driver fails to retrieve all available Power Data Objects (PDOs) from USB PD sources advertising more than 4 PDOs, leading to out-of-bounds memory access. Apply the kernel update through your distribution's package manager and reboot to activate the fix.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check your current kernel version with `uname -r` and compare against 5.12.5—if you're running 5.12.0 through 5.12.4, you are vulnerable
- Step 2: Verify if your system uses UCSI (USB Type-C System Software Interface) by checking for UCSI devices with `lsusb | grep -i type-c` or `dmesg | grep -i ucsi`
- Step 3: Search kernel logs for out-of-bounds access warnings using `dmesg | grep -i 'array-bounds\|out of bounds\|UBSAN' | head -20`
- Step 4: After applying the kernel update, reboot the system and run `uname -r` to confirm the new version is active, then validate no UCSI-related errors appear in `dmesg`
FAQ
What is CVE-2021-46980?
This vulnerability affects the Linux kernel's UCSI USB Type-C driver when it encounters Power Delivery sources advertising more than 4 Power Data Objects (PDOs). Due to message size limitations, the driver only retrieves the first 4 PDOs, but USB PD specification allows up to 7, causing an out-of-bounds array access when a negotiated contract uses a PDO beyond index 4.
Is CVE-2021-46980 being actively exploited?
No, this vulnerability is not listed in the CISA KEV catalog and no public exploits are available. It requires specific hardware (a USB PD source advertising 5+ PDOs) to trigger the out-of-bounds condition.
What versions of Kernel are affected by CVE-2021-46980?
Linux kernel versions 5.12.0 through 5.12.4 are vulnerable. The fix was included starting with kernel 5.12.5.
How do I check if my server is vulnerable to CVE-2021-46980?
Run `uname -r` to display your kernel version—if it reports 5.12.0 through 5.12.4, you are vulnerable. For systems using UCSI devices, also check `lsusb` and `dmesg | grep ucsi` to confirm the driver is active.
Does Defensia detect CVE-2021-46980?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2021-46980 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/1f4642b72be79757f050924a9b9673b6a02034bc
- https://git.kernel.org/stable/c/5e9c6f58b01e6fdfbc740390c01f542a35c97e57
- https://git.kernel.org/stable/c/a453bfd7ef15fd9d524004d3ca7b05353a302911
- https://git.kernel.org/stable/c/e5366bea0277425e1868ba20eeb27c879d5a6e2d
- https://git.kernel.org/stable/c/1f4642b72be79757f050924a9b9673b6a02034bc
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2021-46980. Free for 1 server.
Get started free