CVE-2024-49977 net: stmmac: Fix zero-division error when disabling tc cbs

Medium 5.5 Published Updated

A zero-division error in the Linux kernel stmmac driver causes a denial of service when disabling traffic control CBS offload.

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-49977?

CVE-2024-49977 is a medium-severity denial of service vulnerability in Linux kernel, published on 21 Oct 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:

net: stmmac: Fix zero-division error when disabling tc cbs

The commit b8c43360f6e4 ("net: stmmac: No need to calculate speed divider when offload is disabled") allows the "port_transmit_rate_kbps" to be set to a value of 0, which is then passed to the "div_s64" function when tc-cbs is disabled. This leads to a zero-division error.

When tc-cbs is disabled, the idleslope, sendslope, and credit values the credit values are not required to be configured. Therefore, adding a return statement after setting the txQ mode to DCB when tc-cbs is disabled would prevent a zero-division error.

Weakness: CWE-369

Which versions are affected by CVE-2024-49977?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-49977?

Apply the vendor's patch.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2024-49977 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as AZL-51333, BELL-CVE-2024-49977, DEBIAN-CVE-2024-49977, GHSA-8cpm-hmp4-fcm6, UBUNTU-CVE-2024-49977.

Is CVE-2024-49977 in your software?

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

Check your SBOMs for free