Skip to content
Heist/ feed
Back to feed
UnratedFix available

mm/damon/lru_sort: avoid divide-by-zero in damon_lru_sort_apply_parameters()

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: mm/damon/lru_sort: avoid divide-by-zero in damon_lru_sort_apply_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 'hot_thres' and 'cold_thres', either 'sample_interval' or 'aggr_interval' 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 'aggr_interval' is already required to be set no smaller than 'sample_interval' in damon_set_attrs(), only the case where 'sample_interval' is zero needs to be checked.

Products
Kernel
Affected versions
Not specified
Fixed versions
6.1.153, 6.12.48, 6.16.8, 6.6.107
CVEs
CVE-2025-39909
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 03:22 UTC · Revision 1

Source evidence

mm/damon/lru_sort: avoid divide-by-zero in damon_lru_sort_apply_parameters()

core-osv · Original source

Published 1 Oct 2025, 07:44 UTC

In the Linux kernel, the following vulnerability has been resolved: mm/damon/lru_sort: avoid divide-by-zero in damon_lru_sort_apply_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 'hot_thres' and 'cold_thres', either 'sample_interval' or 'aggr_interval' 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 'aggr_interval' is already required to be set no smaller than 'sample_interval' in damon_set_attrs(), only the case where 'sample_interval' is zero needs to be checked.

osv:CVE-2025-39909

Kernel

Fixed versions: 6.1.153, 6.6.107, 6.12.48, 6.16.8

Complete source record
{
  "id": "c66c26189d606a113f65ab53ce362293a713297e85c8090e46e3e3aea4265b73",
  "url": "https://osv.dev/vulnerability/CVE-2025-39909",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "mm/damon/lru_sort: avoid divide-by-zero in damon_lru_sort_apply_parameters()",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: mm/damon/lru_sort: avoid divide-by-zero in damon_lru_sort_apply_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 'hot_thres' and 'cold_thres', either 'sample_interval' or 'aggr_interval' 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 'aggr_interval' is already required to be set no smaller than 'sample_interval' in damon_set_attrs(), only the case where 'sample_interval' is zero needs to be checked.",
    "evidence": "osv:CVE-2025-39909",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.1.153",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.107",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.48",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.16.8",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2025-39909",
      "aliases": [
        "CVE-2025-39909"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "40e983cca9274e177bd5b9379299b44d9536ac68"
                },
                {
                  "fixed": "74e391f7da7d9d5235a3cca88ee9fc18f720c75b"
                },
                {
                  "fixed": "7bb675c9f0257840d33e5d1337d7e3afdd74a6bf"
                },
                {
                  "fixed": "af0ae62b935317bed1a1361c8c9579db9d300e70"
                },
                {
                  "fixed": "326a4b3750c71af3f3c52399ec4dbe33b6da4c26"
                },
                {
                  "fixed": "711f19dfd783ffb37ca4324388b9c4cb87e71363"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-39909.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.0.0"
                },
                {
                  "fixed": "6.1.153"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.107"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.12.48"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.16.8"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-39909.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:25.486307597Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/326a4b3750c71af3f3c52399ec4dbe33b6da4c26",
        "https://git.kernel.org/stable/c/711f19dfd783ffb37ca4324388b9c4cb87e71363",
        "https://git.kernel.org/stable/c/74e391f7da7d9d5235a3cca88ee9fc18f720c75b",
        "https://git.kernel.org/stable/c/7bb675c9f0257840d33e5d1337d7e3afdd74a6bf",
        "https://git.kernel.org/stable/c/af0ae62b935317bed1a1361c8c9579db9d300e70",
        "https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/39xxx/CVE-2025-39909.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-39909",
        "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/2025/39xxx/CVE-2025-39909.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-39909",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 492157,
  "published_at": "2025-10-01T07:44:32.936+00:00"
}