Skip to main content
Vulnerability Database/CVE-2026-98030

CVE-2026-98030: Linux Kernel DSA BCM SF2 Use-After-Free

CVE-2026-98030 is a use-after-free vulnerability in Linux kernel DSA BCM SF2 driver affecting CFP rule handling. Attackers can exploit buffer overflow conditions to trigger memory corruption. This article covers technical details, affected versions, impact assessment, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-98030 Overview

CVE-2026-98030 is an out-of-bounds write vulnerability in the Linux kernel's Broadcom Starfighter 2 (bcm_sf2) Distributed Switch Architecture (DSA) driver. The function bcm_sf2_cfp_rule_get_all() walks the entire cfp.unique bitmap and writes entries into the caller-provided rule_locs[] array without checking nfc->rule_cnt, the number of slots the caller actually allocated.

The ETHTOOL_GRXCLSRLALL ioctl path does not require CAP_NET_ADMIN, so any local user can trigger the overflow once an administrator has installed Classification Flow Processor (CFP) rules. A rule_cnt of zero leaves the buffer pointer NULL, and the walk dereferences it.

Critical Impact

An unprivileged local user on a system with Broadcom SF2 switch hardware and installed CFP rules can corrupt kernel memory or trigger a NULL pointer dereference, leading to privilege escalation or denial of service.

Affected Products

  • Linux kernel versions containing the bcm_sf2 DSA driver prior to the fix commits
  • Systems using Broadcom Starfighter 2 switch hardware (common on Broadcom-based routers and embedded network devices)
  • Stable kernel branches patched via commits b231b6d8, cdb719f4, f1a2869b, and fd1a78c1

Discovery Timeline

  • 2026-09-25 - CVE-2026-98030 published to the National Vulnerability Database
  • 2026-09-25 - Last updated in NVD database

Technical Details for CVE-2026-98030

Vulnerability Analysis

The vulnerability resides in bcm_sf2_cfp_rule_get_all(), which services the ETHTOOL_GRXCLSRLALL ioctl for enumerating Receive Flow Classifier rules. The ethtool core allocates the rule_locs[] output buffer based on the rule_cnt value supplied by userspace. The driver, however, iterates the full cfp.unique bitmap and writes every installed rule index into rule_locs[] without comparing the write index against nfc->rule_cnt.

When userspace supplies a rule_cnt smaller than the number of installed rules, the driver writes past the end of the allocation, producing a kernel heap out-of-bounds write [CWE-787]. When rule_cnt is zero, the ethtool core may pass a NULL pointer and the first write dereferences it, causing a kernel oops.

Because ETHTOOL_GRXCLSRLALL is reachable without CAP_NET_ADMIN, any logged-in user can trigger the condition once CFP rules exist on the switch.

Root Cause

The root cause is a missing bounds check between the caller-supplied capacity (nfc->rule_cnt) and the number of entries the driver writes while walking cfp.unique. The driver trusts its own view of installed rules instead of honoring the caller's buffer size, violating the contract of the ethtool rule-dump interface.

Attack Vector

Exploitation requires local access and a system using the bcm_sf2 DSA driver with at least one CFP rule already installed by an administrator. The attacker opens a socket and issues an SIOCETHTOOL ioctl with command ETHTOOL_GRXCLSRLALL and a rule_cnt lower than the actual number of installed rules, or zero to trigger the NULL dereference path. The resulting out-of-bounds write targets the kernel slab allocation sized by rule_cnt, offering a primitive for heap corruption and potential privilege escalation.

See the upstream patches referenced in the kernel.org commit b231b6d8 and commit fd1a78c1 for the exact fix that bounds the walk by the caller's buffer size.

Detection Methods for CVE-2026-98030

Indicators of Compromise

  • Kernel oops or panic traces referencing bcm_sf2_cfp_rule_get_all or ethtool_get_rxnfc in dmesg or /var/log/kern.log
  • Unexpected slab corruption warnings from KASAN or SLUB debug on systems with Broadcom SF2 switches
  • Unprivileged processes repeatedly issuing SIOCETHTOOL ioctls with the ETHTOOL_GRXCLSRLALL command

Detection Strategies

  • Enable CONFIG_KASAN on test kernels to catch the out-of-bounds write during fuzzing or validation
  • Audit kernel crash dumps for faulting addresses inside the bcm_sf2 DSA driver
  • Monitor for user-mode binaries invoking ethtool -N or -n style classification queries from non-administrative accounts

Monitoring Recommendations

  • Collect kernel ring buffer and auditd logs centrally and alert on BUG: or general protection fault strings tied to networking drivers
  • Track installed kernel versions across fleets of Broadcom-based embedded devices and OpenWrt-derived routers
  • Correlate ethtool ioctl usage with user privilege level using eBPF-based syscall telemetry

How to Mitigate CVE-2026-98030

Immediate Actions Required

  • Upgrade to a Linux kernel that includes the fix commits b231b6d8, cdb719f4, f1a2869b, or fd1a78c1 for the appropriate stable branch
  • Inventory devices that load the bcm_sf2 module, including SoC-based routers and switches, and prioritize those with CFP rules installed
  • Restrict local shell access on affected network appliances to trusted administrators only

Patch Information

The upstream fix bounds the CFP rule dump walk by the caller's rule_cnt buffer size, preventing writes beyond the allocated rule_locs[] array and avoiding the NULL dereference when rule_cnt is zero. Patches are available in the kernel stable tree:

Apply the stable kernel update for your distribution as soon as it becomes available.

Workarounds

  • Avoid installing CFP rules via ethtool until the kernel is patched, as the overflow condition requires at least one installed rule to be reachable in its primary form
  • Remove or blacklist the bcm_sf2 module on systems that do not require Broadcom SF2 switch functionality
  • Enforce strict local user policies and reduce the set of accounts that can open AF_INET sockets on affected appliances

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.