FKIE_CVE-2026-143377

Vulnerability from fkie_nvd - Published: 2026-12-03 10:18 - Updated: 2026-12-03 10:18
Severity
Summary
In the Linux kernel, the following vulnerability has been resolved: bpf: Drop percpu_counter from the htab element count The element count of a large non-preallocated hash map is a percpu_counter, whose slow path takes fbc->lock with raw_spin_lock_irqsave(). That is not safe against BPF programs that run while the lock is held or contended: NMI programs and, as queued_spin_lock_slowpath() calls trace_contention_end() with the lock already held, programs attached to the contention_end tracepoint. If such a program updates the same map it spins on the lock its own CPU holds: WARNING: possible recursive locking detected cend/250 is trying to acquire lock: (key#5){....}-{2:2}, at: _raw_spin_lock_irqsave+0x18/0x30 but task is already holding lock: (key#5){....}-{2:2}, at: _raw_spin_lock_irqsave+0x18/0x30 percpu_counter_add_batch+0xd8/0x160 alloc_htab_elem+0x408/0x480 htab_map_update_elem+0x1e8/0x6a0 bpf_prog_7a29a1ae68aedf07_cend+0x14c/0x1f8 __bpf_trace_contention_end+0x14/0x20 queued_spin_lock_slowpath+0x2e8/0x468 percpu_counter_add_batch+0xd8/0x160 alloc_htab_elem+0x408/0x480 htab_map_update_elem+0x1e8/0x6a0 is_map_full() is affected too, as __percpu_counter_compare() falls back to percpu_counter_sum(), which takes the same lock. map.elem_count already is a lockless per-cpu count of the same elements. Make htab->count follow it in steps of PERCPU_COUNTER_BATCH and let is_map_full() sum elem_count once count is within nr_cpu_ids * batch of max_entries. Each cpu's elem_count is ahead of count by less than the batch, so that is exact, in NMI as well.
Impacted products
Vendor Product Version

{
  "affected": [
    {
      "affectedData": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "include/linux/bpf.h",
            "kernel/bpf/hashtab.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "6ddc16d58b40bc3276dcd3f4027df5e9e846d26a",
              "status": "affected",
              "version": "86fe28f7692d96d20232af0fc6d7632d5cc89a01",
              "versionType": "git"
            },
            {
              "lessThan": "d7c38cf0acd70e1d6fe99a59b0b2afc235a9f7de",
              "status": "affected",
              "version": "86fe28f7692d96d20232af0fc6d7632d5cc89a01",
              "versionType": "git"
            },
            {
              "lessThan": "1cd28b5354ab77c727ed87255bf289a87178b415",
              "status": "affected",
              "version": "86fe28f7692d96d20232af0fc6d7632d5cc89a01",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "include/linux/bpf.h",
            "kernel/bpf/hashtab.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.1"
            },
            {
              "lessThan": "6.1",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.66",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.3.*",
              "status": "unaffected",
              "version": "7.3.7",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.4-rc2",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    }
  ],
  "cveTags": [],
  "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-\u003elock 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-\u003ecount 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\u0027s elem_count is ahead of count by less than the\nbatch, so that is exact, in NMI as well."
    }
  ],
  "id": "CVE-2026-143377",
  "lastModified": "2026-12-03T10:18:30.727",
  "metrics": {},
  "published": "2026-12-03T10:18:30.727",
  "references": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/1cd28b5354ab77c727ed87255bf289a87178b415"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/6ddc16d58b40bc3276dcd3f4027df5e9e846d26a"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/d7c38cf0acd70e1d6fe99a59b0b2afc235a9f7de"
    }
  ],
  "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
  "vulnStatus": "Received"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.