Skip to content
Heist/ feed
Back to feed
UnratedFix available

bpf: Check ancestor frames for rbtree callbacks

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: bpf: Check ancestor frames for rbtree callbacks bpf_rbtree_add() invokes its comparator while the caller holds the root lock. The native insertion code retains raw parent and link pointers across the callback, so the verifier prohibits unlocking, consuming tree nodes, or changing RCU state from that callback. in_rbtree_lock_required_cb() only checks the innermost verifier frame. Static subprogram calls are permitted while holding a spin lock, and such a call pushes a frame without in_callback_fn set. Consequently, all callback restrictions disappear in the nested frame. The subprogram can unlock the tree, remove and drop the node being compared, then relock. Native insertion resumes with the stale parent pointer and links freed memory into the tree. Walk all active frames for the rbtree callback instead. Benign static subprograms remain permitted, while callback restrictions follow execution into nested frames.

Products
Kernel
Affected versions
Not specified
Fixed versions
6.12.114, 6.18.53, 7.2.7
CVEs
CVE-2026-98047
Confirmed fixed CVEs
Not specified
Updated in this feed
2 Nov 2026, 18:53 UTC · Revision 1

Source evidence

bpf: Check ancestor frames for rbtree callbacks

core-osv · Original source

Published 25 Sept 2026, 10:23 UTC

In the Linux kernel, the following vulnerability has been resolved: bpf: Check ancestor frames for rbtree callbacks bpf_rbtree_add() invokes its comparator while the caller holds the root lock. The native insertion code retains raw parent and link pointers across the callback, so the verifier prohibits unlocking, consuming tree nodes, or changing RCU state from that callback. in_rbtree_lock_required_cb() only checks the innermost verifier frame. Static subprogram calls are permitted while holding a spin lock, and such a call pushes a frame without in_callback_fn set. Consequently, all callback restrictions disappear in the nested frame. The subprogram can unlock the tree, remove and drop the node being compared, then relock. Native insertion resumes with the stale parent pointer and links freed memory into the tree. Walk all active frames for the rbtree callback instead. Benign static subprograms remain permitted, while callback restrictions follow execution into nested frames.

osv:CVE-2026-98047

Kernel

Fixed versions: 6.12.114, 6.18.53, 7.2.7

Complete source record
{
  "id": "61ab71de8eae1a3d50a20c47ffc7fac4935dbadfcc1a0022a566ef351fbdaa3b",
  "url": "https://osv.dev/vulnerability/CVE-2026-98047",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "bpf: Check ancestor frames for rbtree callbacks",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: bpf: Check ancestor frames for rbtree callbacks bpf_rbtree_add() invokes its comparator while the caller holds the root lock. The native insertion code retains raw parent and link pointers across the callback, so the verifier prohibits unlocking, consuming tree nodes, or changing RCU state from that callback. in_rbtree_lock_required_cb() only checks the innermost verifier frame. Static subprogram calls are permitted while holding a spin lock, and such a call pushes a frame without in_callback_fn set. Consequently, all callback restrictions disappear in the nested frame. The subprogram can unlock the tree, remove and drop the node being compared, then relock. Native insertion resumes with the stale parent pointer and links freed memory into the tree. Walk all active frames for the rbtree callback instead. Benign static subprograms remain permitted, while callback restrictions follow execution into nested frames.",
    "evidence": "osv:CVE-2026-98047",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.12.114",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.18.53",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "7.2.7",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2026-98047",
      "aliases": [
        "CVE-2026-98047"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "a44b1334aadd82203f661adb9adb41e53ad0e8d1"
                },
                {
                  "fixed": "252e9b476af723edd299a5c71c389ec018e46656"
                },
                {
                  "fixed": "b545fa447e09e6844868deb2bee228827fe54d15"
                },
                {
                  "fixed": "2410cb2ac0416dd2795a81984c8c73d7250bd8c4"
                },
                {
                  "fixed": "369f4ce734570bdfedaa4b5ca50e2a3f6a892728"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98047.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.9.0"
                },
                {
                  "fixed": "6.12.114"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.18.53"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.19.0"
                },
                {
                  "fixed": "7.2.7"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98047.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:22.314141864Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/2410cb2ac0416dd2795a81984c8c73d7250bd8c4",
        "https://git.kernel.org/stable/c/252e9b476af723edd299a5c71c389ec018e46656",
        "https://git.kernel.org/stable/c/369f4ce734570bdfedaa4b5ca50e2a3f6a892728",
        "https://git.kernel.org/stable/c/b545fa447e09e6844868deb2bee228827fe54d15",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98047.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-98047",
        "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-98047.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-98047",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 488762,
  "published_at": "2026-09-25T10:23:57.347+00:00"
}