CVE-2026-74645: mm/damon/lru_sort: error out for >10000 active_mem_bp
In the Linux kernel, the following vulnerability has been resolved:
mm/damon/lrusort: error out for >10000 activemembp
damosquotascore() can trigger division by zero if the target value is zero. DAMONLRUSORT lets users set the target value for the hot memory scheme via activemembp parameter. It avoids setting it as the target value if the parameter value is zero. However, it also sets the cold memory scheme with a target value that is calculated as '10000 - activemembp + 2'. Hence, if a user sets activemembp 10002, the cold memory scheme's quota goal target value can be zero. As a result, division by zero can be triggered. Fix by returning an error when the user tries to start DAMON with >10000 activemembp parameter value.
It makes no sense to set activemembp with 10002. It also requires module parameters write permission to reproduce the issue. That said, the consequence is quite bad.
One reliable way to reproduce the issue is like below:
# cd /sys/module/damonlrusort/parameters # echo 1000 > wmarkshigh # echo 995 > wmarksmid # echo 0 > wmarkslow # echo 10002 > activemembp # echo Y > enabled # dmesg -w [...] [ 597.421247] Oops: divide error: 0000 [#1] SMP NOPTI [ 597.428848] RIP: 0010:damosquotascore+0x6f/0x480
This issue was discovered [1] by Sashiko.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Do not start DAMON_LRU_SORT with active_mem_bp values greater than 10000. The material indicates the kernel fix errors out for " >10000 active_mem_bp" to prevent quota-score division-by-zero consequences.
Linux kernel DAMON_LRU_SORT module parameter active_mem_bp = <= 10000