{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-139176",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-11-30T13:22:15.918Z",
        "datePublished": "2026-11-30T13:32:17.061Z",
        "dateUpdated": "2026-11-30T13:32:17.061Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-11-30T13:32:17.061Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix bpf_timer callback running on a freed map\n\nA bpf_timer in an inner map can fire after the map has been freed, and\nbpf_timer_cb() then reads the freed map:\n\n  [   50.709520] BUG: KASAN: slab-use-after-free in bpf_timer_cb+0x249/0x290\n  [   50.709540] Read of size 4 at addr ff11000003bc1030 by task bpftimer/72\n  ...\n  [   50.710783] Freed by task 12:\n  ...\n  [   50.710826]  bpf_map_free+0x1a2/0x380\n\nWhen user space closes the map, its timers are cancelled and their\ncallbacks are cleared.  Since commit 1bfbc267ec91 (\"bpf: Enable\nbpf_timer and bpf_wq in any context\"), bpf_timer_set_callback() and\nbpf_timer_start() run without a lock, so a program that found the timer\njust before the close can still use it afterwards:\n\n  Task A                  Task B                  Task C\n  ------                  ------                  ------\n  bpf_timer_start()\n    finds the timer\n                          bpf_timer_set_callback()\n                            finds the timer\n                                                  close(map_fd)\n                                                    clears the callback\n                                                    cancels the timer\n                            sets the callback\n    arms the timer\n                                                  deletes the map from\n                                                  the outer map\n                                                    map is freed\n  the timer fires\n    bpf_timer_cb() reads the freed map\n\nThe timer is cancelled once more when it is finally freed, but that\nhappens well after the inner map is freed, so a timer started this way\ncan still fire on the freed map.\n\nClear the timer's map pointer in bpf_async_cancel_and_free() before the\nmap can be freed, and make the bpf_timer and bpf_wq callbacks return\nearly when it is NULL.  The map is not freed until callbacks that are\nalready running have finished, so a callback either sees the map while\nit is still valid or sees NULL.\n\nThe reproducer below calls the two helpers in a loop on two CPUs while a\nthird CPU keeps creating an inner map with a timer, closing it and\nremoving it from the outer map.  This bug was identified and confirmed\nwith the help of a deterministic hypervisor currently under development,\nbut the non-deterministic C reproducer can typically trigger it in the\n1-50s time range.  With the fix, nothing is triggered after 600 seconds."
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "kernel/bpf/helpers.c"
                    ],
                    "versions": [
                        {
                            "version": "1bfbc267ec915e58c3723a2237bf067f0c4dffa8",
                            "lessThan": "59d581d8e9cc019ebedc8145ec8ba56ca04e2383",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "1bfbc267ec915e58c3723a2237bf067f0c4dffa8",
                            "lessThan": "815a0a2a40d6c5985a153041231731651bc4024b",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "kernel/bpf/helpers.c"
                    ],
                    "versions": [
                        {
                            "version": "7.0",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "7.0",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.3.6",
                            "lessThanOrEqual": "7.3.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.4-rc1",
                            "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": "7.0",
                                    "versionEndExcluding": "7.3.6"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "7.0",
                                    "versionEndExcluding": "7.4-rc1"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/59d581d8e9cc019ebedc8145ec8ba56ca04e2383"
                },
                {
                    "url": "https://git.kernel.org/stable/c/815a0a2a40d6c5985a153041231731651bc4024b"
                }
            ],
            "title": "bpf: Fix bpf_timer callback running on a freed map",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}