FKIE_CVE-2026-139323

Vulnerability from fkie_nvd - Published: 2026-11-30 14:18 - Updated: 2026-11-30 14:18
Severity
Summary
In the Linux kernel, the following vulnerability has been resolved: bpf: Don't hand out a linked element as extra element When htab_map_update_elem() replaces an element of a preallocated map, alloc_htab_elem() takes the spare element of this cpu and puts the old element into the per-cpu slot right away, long before the old element is unlinked from its bucket. The bucket lock disables interrupts, but it does not keep out an NMI, or a tracing program on the return of alloc_htab_elem(). bpf_prog_active only helps if both programs are kprobe, tracepoint or perf_event programs. A program that updates an existing key in another bucket of the same map gets to use the slot: htab_map_update_elem(k1) tc, xdp, fentry, raw_tp, ... alloc_htab_elem() l_new = *pl_new *pl_new = l_old still linked in bucket 1 <NMI> htab_map_update_elem(k2) perf_event program l_new = *pl_new the l_old of the outer update hlist_nulls_add_head_rcu(l_new, bucket 2) hlist_nulls_del_rcu(k2's old element) </NMI> hlist_nulls_add_head_rcu(l_new, bucket 1) hlist_nulls_del_rcu(l_old) If l_old was the first element of bucket 1, the outer add points its pprev at l_new, and the delete takes it out of bucket 1 only. l_new->next now leads into bucket 2, where l_old stays with a poisoned pprev, on which a delete of k2 crashes. If it was not the first, the delete takes it out of bucket 2: k2 is gone from the map, and the chain of bucket 1 still contains l_old, whose next pointer leads into bucket 2. Either way a walk of bucket 1 ends on the nulls value of bucket 2. lookup_nulls_elem_raw() restarts whenever that happens, so every lookup in bucket 1 which does not find its key spins forever: rcu: INFO: rcu_preempt detected stalls on CPUs/tasks: __htab_map_lookup_elem+0x354/0x4d0 BUG: KASAN: wild-memory-access in htab_map_delete_elem+0x30c/0x670 Write of size 8 at addr dead000000000122 by task extra/102 An NMI between the load and the store of the slot makes both updates use the same element, with much the same result. Empty the slot when the spare element is taken, in a way that is atomic on this cpu, and put the old element in only after it has been unlinked and its timers and the like have been cancelled. A nested update that finds the slot empty, which is the case that corrupted the map, fails with -EBUSY.
Impacted products
Vendor Product Version

{
  "affected": [
    {
      "affectedData": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "kernel/bpf/hashtab.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "45dfd3617c74ffff6633d136815f193597a817cd",
              "status": "affected",
              "version": "8c290e60fa2a51806159522331c9ed41252a8fb3",
              "versionType": "git"
            },
            {
              "lessThan": "00ea598142f5bdf6c4f3da2f8e66cbbd2ec2c60d",
              "status": "affected",
              "version": "8c290e60fa2a51806159522331c9ed41252a8fb3",
              "versionType": "git"
            },
            {
              "lessThan": "103d8a81021b1d7dbec91c339d5b5b7a4184aa89",
              "status": "affected",
              "version": "8c290e60fa2a51806159522331c9ed41252a8fb3",
              "versionType": "git"
            },
            {
              "lessThan": "ccb88db8dac8fabde58656d5d4a33711e89c480a",
              "status": "affected",
              "version": "8c290e60fa2a51806159522331c9ed41252a8fb3",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "kernel/bpf/hashtab.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "4.11"
            },
            {
              "lessThan": "4.11",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.120",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.66",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.3.*",
              "status": "unaffected",
              "version": "7.3.6",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.4-rc1",
              "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: Don\u0027t hand out a linked element as extra element\n\nWhen htab_map_update_elem() replaces an element of a preallocated map,\nalloc_htab_elem() takes the spare element of this cpu and puts the old\nelement into the per-cpu slot right away, long before the old element is\nunlinked from its bucket.  The bucket lock disables interrupts, but it\ndoes not keep out an NMI, or a tracing program on the return of\nalloc_htab_elem().  bpf_prog_active only helps if both programs are\nkprobe, tracepoint or perf_event programs.  A program that updates an\nexisting key in another bucket of the same map gets to use the slot:\n\n  htab_map_update_elem(k1)              tc, xdp, fentry, raw_tp, ...\n    alloc_htab_elem()\n      l_new = *pl_new\n      *pl_new = l_old                   still linked in bucket 1\n      \u003cNMI\u003e\n        htab_map_update_elem(k2)        perf_event program\n          l_new = *pl_new               the l_old of the outer update\n          hlist_nulls_add_head_rcu(l_new, bucket 2)\n          hlist_nulls_del_rcu(k2\u0027s old element)\n      \u003c/NMI\u003e\n    hlist_nulls_add_head_rcu(l_new, bucket 1)\n    hlist_nulls_del_rcu(l_old)\n\nIf l_old was the first element of bucket 1, the outer add points its pprev\nat l_new, and the delete takes it out of bucket 1 only.  l_new-\u003enext now\nleads into bucket 2, where l_old stays with a poisoned pprev, on which a\ndelete of k2 crashes.  If it was not the first, the delete takes it out of\nbucket 2: k2 is gone from the map, and the chain of bucket 1 still contains\nl_old, whose next pointer leads into bucket 2.\n\nEither way a walk of bucket 1 ends on the nulls value of bucket 2.\nlookup_nulls_elem_raw() restarts whenever that happens, so every lookup in\nbucket 1 which does not find its key spins forever:\n\n  rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:\n   __htab_map_lookup_elem+0x354/0x4d0\n\n  BUG: KASAN: wild-memory-access in htab_map_delete_elem+0x30c/0x670\n  Write of size 8 at addr dead000000000122 by task extra/102\n\nAn NMI between the load and the store of the slot makes both updates use\nthe same element, with much the same result.\n\nEmpty the slot when the spare element is taken, in a way that is atomic\non this cpu, and put the old element in only after it has been unlinked\nand its timers and the like have been cancelled.  A nested update that\nfinds the slot empty, which is the case that corrupted the map, fails with\n-EBUSY."
    }
  ],
  "id": "CVE-2026-139323",
  "lastModified": "2026-11-30T14:18:56.800",
  "metrics": {},
  "published": "2026-11-30T14:18:56.800",
  "references": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/00ea598142f5bdf6c4f3da2f8e66cbbd2ec2c60d"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/103d8a81021b1d7dbec91c339d5b5b7a4184aa89"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/45dfd3617c74ffff6633d136815f193597a817cd"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/ccb88db8dac8fabde58656d5d4a33711e89c480a"
    }
  ],
  "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.