CVE-2024-26995 usb: typec: tcpm: Correct the PDO counting in pd_set

High 7.8 Published Updated

An off-by-one error in Linux kernel USB Type-C power negotiation can cause incorrect power levels, leading to potential over-voltage, over-current, or port resets.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2024-26995?

CVE-2024-26995 is a high-severity vulnerability in Linux kernel, published on 1 May 2024. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

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

usb: typec: tcpm: Correct the PDO counting in pd_set

Off-by-one errors happen because nr_snk_pdo and nr_src_pdo are incorrectly added one. The index of the loop is equal to the number of PDOs to be updated when leaving the loop and it doesn't need to be added one.

When doing the power negotiation, TCPM relies on the "nr_snk_pdo" as the size of the local sink PDO array to match the Source capabilities of the partner port. If the off-by-one overflow occurs, a wrong RDO might be sent and unexpected power transfer might happen such as over voltage or over current (than expected).

"nr_src_pdo" is used to set the Rp level when the port is in Source role. It is also the array size of the local Source capabilities when filling up the buffer which will be sent as the Source PDOs (such as in Power Negotiation). If the off-by-one overflow occurs, a wrong Rp level might be set and wrong Source PDOs will be sent to the partner port. This could potentially cause over current or port resets.

Weakness: CWE-193

Which versions are affected by CVE-2024-26995?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-26995?

Apply the vendor's patch.

Is CVE-2024-26995 being exploited?

There is no known exploitation of CVE-2024-26995 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2024-26995, DEBIAN-CVE-2024-26995, GHSA-pq56-r999-wpfm, UBUNTU-CVE-2024-26995.

Is CVE-2024-26995 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free