mm/damon/core: avoid overflow in damon_feed_loop_next_input()
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.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.11.8
- CVEs
- CVE-2024-50270
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 6 Nov 2026, 01:45 UTC · Revision 1
Source evidence
mm/damon/core: avoid overflow in damon_feed_loop_next_input()
core-osv · Original sourcePublished 19 Nov 2024, 01:30 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.
osv:CVE-2024-50270
Kernel
Fixed versions: 6.11.8
Complete source record
{
"id": "8bb13133b12cfa84ae485276fc8ec5d8b12a11c4df5caf2e1c4c267b2be8f55f",
"url": "https://osv.dev/vulnerability/CVE-2024-50270",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "mm/damon/core: avoid overflow in damon_feed_loop_next_input()",
"summary": "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.",
"evidence": "osv:CVE-2024-50270",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.11.8",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "medium",
"structured": {
"id": "CVE-2024-50270",
"aliases": [
"CVE-2024-50270"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "9294a037c01564786abb15436529fae3863268a2"
},
{
"fixed": "2d339a1f0f16ff5dea58e612ff336f0be0d041e9"
},
{
"fixed": "4401e9d10ab0281a520b9f8c220f30f60b5c248f"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-50270.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.8.0"
},
{
"fixed": "6.11.8"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-50270.json"
}
}
],
"modified": "2026-10-28T02:30:46.282841791Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/2d339a1f0f16ff5dea58e612ff336f0be0d041e9",
"https://git.kernel.org/stable/c/4401e9d10ab0281a520b9f8c220f30f60b5c248f",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/50xxx/CVE-2024-50270.json",
"https://nvd.nist.gov/vuln/detail/CVE-2024-50270",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/50xxx/CVE-2024-50270.json"
}
},
"related_cves": [
{
"value": "CVE-2024-50270",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 513983,
"published_at": "2024-11-19T01:30:08.406+00:00"
}