CVE-2026-138897: mm/damon/core: handle extreme memory state in damon_get_node_mem_bp()
In the Linux kernel, the following vulnerability has been resolved:
mm/damon/core: handle extreme memory state in damongetnodemembp()
In an extreme and unlikely situation, simeminfonode() might let the caller show zero total ram. That could cause a divide by zero in damongetnodemembp(). It could also show free memory larger than the total memory. This could cause underflow and make DAMOS temporarily make unexpected behavior. Thanks to safety guards in the auto-tuning feedback loop, that should not be a real problem, though. Fix the problems by respectively returning 100% and 0% for used and free memory queries in the corner cases.
The issue was discovered [1] by Sashiko.
Affected Software
Event History
Frequently Asked Questions
What conditions are required to trigger the issue?
The issue requires an extreme and unlikely memory-accounting state in which si_meminfo_node() reports zero total RAM, causing a divide-by-zero path, or reports free memory greater than total memory, causing an underflow path.
What is the expected impact if free memory is reported above total memory?
The underflow can cause DAMOS to behave unexpectedly on a temporary basis. The description states that safety guards in the auto-tuning feedback loop should prevent this from becoming a real problem.
How does the fix handle invalid memory values?
For these corner cases, the fix returns 100% for used-memory queries and 0% for free-memory queries, avoiding both division by zero and underflow.