Skip to content
Heist/ feed
Unrated

bpf: Avoid soft lockup in __htab_map_lookup_and_delete_batch()

Type: advisorySource: Official CVE List1 source record

In the Linux kernel, the following vulnerability has been resolved: bpf: Avoid soft lockup in __htab_map_lookup_and_delete_batch() __htab_map_lookup_and_delete_batch() has no rescheduling point. The batch count bounds how many entries are copied out, not how many buckets are visited, so one BPF_MAP_LOOKUP_BATCH call can walk the map end to end. The empty-bucket fast path is worse: it stays inside a single rcu_read_lock() / bpf_disable_instrumentation() section for any run of consecutive empty buckets. That holds up on small maps, but it falls apart at scale. On a 144-CPU arm64 host running a CONFIG_PREEMPT_NONE kernel, periodic BPF_MAP_LOOKUP_BATCH calls against an LRU hash map with 16,777,216 buckets held a CPU inside the batch op for 77+ seconds and triggered the soft lockup watchdog. Commit 75134f16e7dd ("bpf: Add schedule points in batch ops") fixed this same problem in the generic batch ops, but not in this htab-native path, which every htab-based hash map variant uses for its lookup[_and_delete] batch ops. Complete that fix here. Leave the critical section after 64 consecutive empty buckets, call cond_resched_tasks_rcu_qs(), and resume at the saved bucket cursor. No locks are held at that point, and resuming from the cursor is already the function's behavior for non-empty buckets. Add the same call to the per-bucket loop after copy_to_user(), where every lock has been dropped. cond_resched_rcu() is not enough here: sleeping with bpf_prog_active elevated makes tracing pr

Announced Group revision 1
Original source ↗

CVE-2026-98644

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2026-98644

Linux

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Linux

Source reference: /containers/cna/affected/1/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "057996380a42bb64ccc04383cfa9c0ace4ea11f0",
        "lessThan": "5c8b1869cb99a32a962388848cd19604fb41263e",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "057996380a42bb64ccc04383cfa9c0ace4ea11f0",
        "lessThan": "ca5bd55fc508fbb5c08c62206d02237a5b6fc7e8",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "057996380a42bb64ccc04383cfa9c0ace4ea11f0",
        "lessThan": "77a3b52b4455e6377e549539e757bc55eedefb51",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "057996380a42bb64ccc04383cfa9c0ace4ea11f0",
        "lessThan": "f0c09de08ec077098b7e1563f2285f1c136cd816",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "057996380a42bb64ccc04383cfa9c0ace4ea11f0",
        "lessThan": "44f9bcb5ab2b268bc763ed3ebec83308b4972936",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "057996380a42bb64ccc04383cfa9c0ace4ea11f0",
        "lessThan": "4e48fe9b1c77966bede0a73feb3059d7595f642d",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "057996380a42bb64ccc04383cfa9c0ace4ea11f0",
        "lessThan": "85136bf22404474a815fc0ed26ec0d1cbc1bc3f9",
        "versionType": "git"
      }
    ],
    "programFiles": [
      "kernel/bpf/hashtab.c"
    ],
    "defaultStatus": "unaffected"
  },
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "5.6"
      },
      {
        "status": "unaffected",
        "version": "0",
        "lessThan": "5.6",
        "versionType": "semver"
      },
      {
        "status": "unaffected",
        "version": "5.15.222",
        "versionType": "semver",
        "lessThanOrEqual": "5.15.*"
      },
      {
        "status": "unaffected",
        "version": "6.1.189",
        "versionType": "semver",
        "lessThanOrEqual": "6.1.*"
      },
      {
        "status": "unaffected",
        "version": "6.6.158",
        "versionType": "semver",
        "lessThanOrEqual": "6.6.*"
      },
      {
        "status": "unaffected",
        "version": "6.12.112",
        "versionType": "semver",
        "lessThanOrEqual": "6.12.*"
      },
      {
        "status": "unaffected",
        "version": "6.18.55",
        "versionType": "semver",
        "lessThanOrEqual": "6.18.*"
      },
      {
        "status": "unaffected",
        "version": "7.2.9",
        "versionType": "semver",
        "lessThanOrEqual": "7.2.*"
      },
      {
        "status": "unaffected",
        "version": "7.3",
        "versionType": "original_commit_for_fix",
        "lessThanOrEqual": "*"
      }
    ],
    "programFiles": [
      "kernel/bpf/hashtab.c"
    ],
    "defaultStatus": "affected"
  }
]
Related CVEs
CVE-2026-98644

Source reference: /cveMetadata/cveId

Publisher severity

No explicit severity was provided.

Event
#38664 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement