{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-31457",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-03-09T15:48:24.092Z",
        "datePublished": "2026-04-22T13:53:50.220Z",
        "dateUpdated": "2026-05-11T22:09:05.878Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-05-11T22:09:05.878Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm/damon/sysfs: check contexts->nr in repeat_call_fn\n\ndamon_sysfs_repeat_call_fn() calls damon_sysfs_upd_tuned_intervals(),\ndamon_sysfs_upd_schemes_stats(), and\ndamon_sysfs_upd_schemes_effective_quotas() without checking contexts->nr. \nIf nr_contexts is set to 0 via sysfs while DAMON is running, these\nfunctions dereference contexts_arr[0] and cause a NULL pointer\ndereference.  Add the missing check.\n\nFor example, the issue can be reproduced using DAMON sysfs interface and\nDAMON user-space tool (damo) [1] like below.\n\n    $ sudo damo start --refresh_interval 1s\n    $ echo 0 | sudo tee \\\n            /sys/kernel/mm/damon/admin/kdamonds/0/contexts/nr_contexts"
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "mm/damon/sysfs.c"
                    ],
                    "versions": [
                        {
                            "version": "d809a7c64ba8229286b333c0cba03b1cdfb50238",
                            "lessThan": "3527e9fdc38570cea0f6ddb7a2c9303d4044b217",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "d809a7c64ba8229286b333c0cba03b1cdfb50238",
                            "lessThan": "652cd0641a763dd0e846b0d12814977fadb2b7d8",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "d809a7c64ba8229286b333c0cba03b1cdfb50238",
                            "lessThan": "6557004a8b59c7701e695f02be03c7e20ed1cc15",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "mm/damon/sysfs.c"
                    ],
                    "versions": [
                        {
                            "version": "6.17",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.17",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.18.21",
                            "lessThanOrEqual": "6.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.19.11",
                            "lessThanOrEqual": "6.19.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.0",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.17",
                                    "versionEndExcluding": "6.18.21"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.17",
                                    "versionEndExcluding": "6.19.11"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.17",
                                    "versionEndExcluding": "7.0"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/3527e9fdc38570cea0f6ddb7a2c9303d4044b217"
                },
                {
                    "url": "https://git.kernel.org/stable/c/652cd0641a763dd0e846b0d12814977fadb2b7d8"
                },
                {
                    "url": "https://git.kernel.org/stable/c/6557004a8b59c7701e695f02be03c7e20ed1cc15"
                }
            ],
            "title": "mm/damon/sysfs: check contexts->nr in repeat_call_fn",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}