CVE-2026-98787

bpf: Fix missing migration protection in __rhtab_map_lookup_and_delete_batch()

Published Oct 18, 2026 CVSS 3.1 · 4.1 Medium EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

bpf: Fix missing migration protection in __rhtab_map_lookup_and_delete_batch()

bpf_mem_cache_free_rcu() uses this_cpu_ptr() which requires migration
to be disabled. All callers of rhtab_delete_elem() disable migration
except __rhtab_map_lookup_and_delete_batch(), which calls it under
rcu_read_lock() only.

On CONFIG_PREEMPT_RCU, rcu_read_lock() does not disable preemption or
migration, so the task can migrate between CPUs during the delete loop,
causing this_cpu_ptr() to trigger:

BUG: using smp_processor_id() in preemptible [00000000] code

Fix by wrapping the delete loop in migrate_disable()/migrate_enable()
in __rhtab_map_lookup_and_delete_batch(), matching the migration
protection that the other callers already provide.

Analysis

AI-generated

Technical impact

The vulnerability occurs in the Linux kernel’s BPF subsystem, where a missing migration guard around a batch deletion routine can cause the kernel to BUG. When the processor ID is read while a task has migrated between CPUs, the kernel triggers a fault that can lead to a crash. The impact is a denial of service by destabilizing the entire system, with no direct privilege escalation indicated in the description.

Affected Systems

All Linux kernel installations that contain the __rhtab_map_lookup_and_delete_batch function are potentially affected. The vulnerability applies to any kernel configuration that enables CONFIG_PREEMPT_RCU, as this mode removes preemption and migration protection for the code path in question. No specific kernel version range is provided, so any current or recent kernel build that has not been patched needs assessment.

Risk and Exploitability

The CVSS score of 4.1 categorizes this vulnerability as low to moderate risk. The EPSS score of less than 1% suggests a low likelihood of exploitation. Although the issue is not listed in the CISA KEV catalog, the kernel panic could still impact availability. The primary vector likely remains normal BPF map operations performed by privileged users or services.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply a Linux kernel update that contains the rhtab_map_lookup_and_delete_batch migration guard fix.
  • If an immediate kernel update is not possible, temporarily disable CONFIG_PREEMPT_RCU or migrate the system to a configuration that avoids the bug until a patch is available.
  • Continuously monitor kernel logs for BUG or panic messages related to smp_processor_id() in preemptible code, and report findings to the kernel community or vendor for rapid resolution.

Generated by OpenCVE AI on October 24, 2026 at 04:29 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-759
Type Values Removed Values Added
Weaknesses CWE-821
References
Metrics threat_severity

None

cvssV3_1

{'score': 4.1, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate

Type Values Removed Values Added
Weaknesses CWE-759
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: bpf: Fix missing migration protection in __rhtab_map_lookup_and_delete_batch() bpf_mem_cache_free_rcu() uses this_cpu_ptr() which requires migration to be disabled. All callers of rhtab_delete_elem() disable migration except __rhtab_map_lookup_and_delete_batch(), which calls it under rcu_read_lock() only. On CONFIG_PREEMPT_RCU, rcu_read_lock() does not disable preemption or migration, so the task can migrate between CPUs during the delete loop, causing this_cpu_ptr() to trigger: BUG: using smp_processor_id() in preemptible [00000000] code Fix by wrapping the delete loop in migrate_disable()/migrate_enable() in __rhtab_map_lookup_and_delete_batch(), matching the migration protection that the other callers already provide.
Title bpf: Fix missing migration protection in __rhtab_map_lookup_and_delete_batch()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-821

    Incorrect Synchronization

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Oct 19, 2026, 9:25 AM
Reserved
Sep 25, 2026, 10:25 AM
Status
Received
Published
Oct 18, 2026, 4:17 PM
Modified
Oct 19, 2026, 10:19 AM
Severity
Moderate
Public date
Oct 18, 2026, 12:00 AM