Bug 2327204 (CVE-2024-50270) - CVE-2024-50270 kernel: mm/damon/core: avoid overflow in damon_feed_loop_next_input()
Summary: CVE-2024-50270 kernel: mm/damon/core: avoid overflow in damon_feed_loop_next_...
Keywords:
Status: NEW
Alias: CVE-2024-50270
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On: 2327215
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-11-19 02:03 UTC by OSIDB Bzimport
Modified: 2024-11-21 19:05 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2024-11-19 02:03:46 UTC
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.

Comment 1 Avinash Hanwate 2024-11-19 04:13:56 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2024111927-CVE-2024-50270-473a@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.