In the Linux kernel, the following vulnerability has been resolved:
mm/damon/lrusort: avoid divide-by-zero in damonlrusortapply_parameters()
Patch series "mm/damon: avoid divide-by-zero in DAMON module's parameters application".
DAMON's RECLAIM and LRU_SORT modules perform no validation on user-configured parameters during application, which may lead to division-by-zero errors.
Avoid the divide-by-zero by adding validation checks when DAMON modules attempt to apply the parameters.
This patch (of 2):
During the calculation of 'hotthres' and 'coldthres', either 'sampleinterval' or 'aggrinterval' is used as the divisor, which may lead to division-by-zero errors. Fix it by directly returning -EINVAL when such a case occurs. Additionally, since 'aggrinterval' is already required to be set no smaller than 'sampleinterval' in damonsetattrs(), only the case where 'sample_interval' is zero needs to be checked.
[
{
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@74e391f7da7d9d5235a3cca88ee9fc18f720c75b",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"83663978343147728185198047237564254931",
"46735116853786251715789582887914411799",
"118272145479002426145335067721439654136"
]
},
"target": {
"file": "mm/damon/lru_sort.c"
},
"id": "CVE-2025-39909-0d08ad42"
},
{
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@74e391f7da7d9d5235a3cca88ee9fc18f720c75b",
"signature_type": "Function",
"digest": {
"function_hash": "170074307495939660514723697900828157766",
"length": 841.0
},
"target": {
"function": "damon_lru_sort_apply_parameters",
"file": "mm/damon/lru_sort.c"
},
"id": "CVE-2025-39909-67095399"
},
{
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7bb675c9f0257840d33e5d1337d7e3afdd74a6bf",
"signature_type": "Function",
"digest": {
"function_hash": "170074307495939660514723697900828157766",
"length": 841.0
},
"target": {
"function": "damon_lru_sort_apply_parameters",
"file": "mm/damon/lru_sort.c"
},
"id": "CVE-2025-39909-8f221704"
},
{
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7bb675c9f0257840d33e5d1337d7e3afdd74a6bf",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"83663978343147728185198047237564254931",
"46735116853786251715789582887914411799",
"118272145479002426145335067721439654136"
]
},
"target": {
"file": "mm/damon/lru_sort.c"
},
"id": "CVE-2025-39909-910b49d6"
},
{
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@af0ae62b935317bed1a1361c8c9579db9d300e70",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"295683988329300142447154091069696961218",
"187768850950955958895683687716585784804",
"235038582311232280772948221655855422945"
]
},
"target": {
"file": "mm/damon/lru_sort.c"
},
"id": "CVE-2025-39909-b6a0c70d"
},
{
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@af0ae62b935317bed1a1361c8c9579db9d300e70",
"signature_type": "Function",
"digest": {
"function_hash": "81977551780018305934356595898055410413",
"length": 760.0
},
"target": {
"function": "damon_lru_sort_apply_parameters",
"file": "mm/damon/lru_sort.c"
},
"id": "CVE-2025-39909-fba64bcc"
}
]