Skip to content
Heist/ feed
Back to feed
UnratedFix available

bpf: Fix missing migration protection in __rhtab_map_lookup_and_delete_batch()

Type: advisorySources: OSV

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.

Products
Kernel
Affected versions
Not specified
Fixed versions
7.2.10
CVEs
CVE-2026-98787
Confirmed fixed CVEs
Not specified
Updated in this feed
5 Nov 2026, 16:26 UTC · Revision 1

Source evidence

bpf: Fix missing migration protection in __rhtab_map_lookup_and_delete_batch()

core-osv · Original source

Published 18 Oct 2026, 15:48 UTC

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.

osv:CVE-2026-98787

Kernel

Fixed versions: 7.2.10

Complete source record
{
  "id": "829c2d33bbcc8aaf1c0cb82e0ccd34790534249fcb656a89c427af69d3e1e441",
  "url": "https://osv.dev/vulnerability/CVE-2026-98787",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "bpf: Fix missing migration protection in __rhtab_map_lookup_and_delete_batch()",
    "summary": "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.",
    "evidence": "osv:CVE-2026-98787",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "7.2.10",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2026-98787",
      "aliases": [
        "CVE-2026-98787"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "818e0084822742fc00eacbf5df3476a5e72c7d0e"
                },
                {
                  "fixed": "94f41ec5fa578765b74ad5736c2f029e7aabc46d"
                },
                {
                  "fixed": "de020dc8049bfb2b22e3b6d99c031feb2e22d112"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98787.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "7.2.0"
                },
                {
                  "fixed": "7.2.10"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98787.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:44.240819899Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/94f41ec5fa578765b74ad5736c2f029e7aabc46d",
        "https://git.kernel.org/stable/c/de020dc8049bfb2b22e3b6d99c031feb2e22d112",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98787.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-98787",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98787.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-98787",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 512392,
  "published_at": "2026-10-18T15:48:23.947+00:00"
}