{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-143377",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-12-03T03:10:28.372Z",
        "datePublished": "2026-12-03T09:22:25.137Z",
        "dateUpdated": "2026-12-03T09:22:25.137Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-12-03T09:22:25.137Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Drop percpu_counter from the htab element count\n\nThe element count of a large non-preallocated hash map is a\npercpu_counter, whose slow path takes fbc->lock with\nraw_spin_lock_irqsave(). That is not safe against BPF programs that run\nwhile the lock is held or contended: NMI programs and, as\nqueued_spin_lock_slowpath() calls trace_contention_end() with the lock\nalready held, programs attached to the contention_end tracepoint. If such\na program updates the same map it spins on the lock its own CPU holds:\n\n  WARNING: possible recursive locking detected\n  cend/250 is trying to acquire lock:\n  (key#5){....}-{2:2}, at: _raw_spin_lock_irqsave+0x18/0x30\n  but task is already holding lock:\n  (key#5){....}-{2:2}, at: _raw_spin_lock_irqsave+0x18/0x30\n    percpu_counter_add_batch+0xd8/0x160\n    alloc_htab_elem+0x408/0x480\n    htab_map_update_elem+0x1e8/0x6a0\n    bpf_prog_7a29a1ae68aedf07_cend+0x14c/0x1f8\n    __bpf_trace_contention_end+0x14/0x20\n    queued_spin_lock_slowpath+0x2e8/0x468\n    percpu_counter_add_batch+0xd8/0x160\n    alloc_htab_elem+0x408/0x480\n    htab_map_update_elem+0x1e8/0x6a0\n\nis_map_full() is affected too, as __percpu_counter_compare() falls back\nto percpu_counter_sum(), which takes the same lock.\n\nmap.elem_count already is a lockless per-cpu count of the same elements.\nMake htab->count follow it in steps of PERCPU_COUNTER_BATCH and let\nis_map_full() sum elem_count once count is within nr_cpu_ids * batch of\nmax_entries. Each cpu's elem_count is ahead of count by less than the\nbatch, so that is exact, in NMI as well."
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "include/linux/bpf.h",
                        "kernel/bpf/hashtab.c"
                    ],
                    "versions": [
                        {
                            "version": "86fe28f7692d96d20232af0fc6d7632d5cc89a01",
                            "lessThan": "6ddc16d58b40bc3276dcd3f4027df5e9e846d26a",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "86fe28f7692d96d20232af0fc6d7632d5cc89a01",
                            "lessThan": "d7c38cf0acd70e1d6fe99a59b0b2afc235a9f7de",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "86fe28f7692d96d20232af0fc6d7632d5cc89a01",
                            "lessThan": "1cd28b5354ab77c727ed87255bf289a87178b415",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "include/linux/bpf.h",
                        "kernel/bpf/hashtab.c"
                    ],
                    "versions": [
                        {
                            "version": "6.1",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.1",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.18.66",
                            "lessThanOrEqual": "6.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.3.7",
                            "lessThanOrEqual": "7.3.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.4-rc2",
                            "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.1",
                                    "versionEndExcluding": "6.18.66"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.1",
                                    "versionEndExcluding": "7.3.7"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.1",
                                    "versionEndExcluding": "7.4-rc2"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/6ddc16d58b40bc3276dcd3f4027df5e9e846d26a"
                },
                {
                    "url": "https://git.kernel.org/stable/c/d7c38cf0acd70e1d6fe99a59b0b2afc235a9f7de"
                },
                {
                    "url": "https://git.kernel.org/stable/c/1cd28b5354ab77c727ed87255bf289a87178b415"
                }
            ],
            "title": "bpf: Drop percpu_counter from the htab element count",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}