CVE-2024-50270 mm/damon/core: avoid overflow in damon_feed_loop_next_input()

Medium 5.5 Published Updated

An integer overflow in the Linux kernel DAMON subsystem can lead to incorrect calculations, potentially causing a denial of service.

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

CVE-2024-50270 is a medium-severity vulnerability in Linux kernel, published on 19 Nov 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:

mm/damon/core: avoid overflow in damon_feed_loop_next_input()

damon_feed_loop_next_input() is inefficient and fragile to overflows. Specifically, 'score_goal_diff_bp' calculation can overflow when 'score' is high. The calculation is actually unnecessary at all because 'goal' is a constant of value 10,000. Calculation of 'compensation' is again fragile to overflow. Final calculation of return value for under-achiving case is again fragile to overflow when the current score is under-achieving the target.

Add two corner cases handling at the beginning of the function to make the body easier to read, and rewrite the body of the function to avoid overflows and the unnecessary bp value calcuation.

Weakness: CWE-190

Which versions are affected by CVE-2024-50270?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-50270?

Apply the vendor's patch.

Is CVE-2024-50270 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2024-50270, DEBIAN-CVE-2024-50270, GHSA-vm8m-g3fg-cr9m, UBUNTU-CVE-2024-50270.

Is CVE-2024-50270 in your software?

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

Check your SBOMs for free