Description
In the Linux kernel, the following vulnerability has been resolved:

net/sched: cls_bpf: prevent unbounded recursion in offload rollback

Quan Sun reported [1] a stack overflow in cls_bpf_offload_cmd().

Reproducer on netdevsim: add a skip_sw cls_bpf filter, set the
bpf_tc_accept debugfs knob to 0, then `tc filter replace`. The replace
calls tc_setup_cb_replace() which fails. cls_bpf_offload_cmd() then
swaps prog/oldprog and recursively calls itself to roll back. But
bpf_tc_accept=0 makes the rollback fail too, which triggers yet another
rollback frame with the same arguments, and so on until the stack is
exhausted.

bpf_tc_accept is just a convenient knob for the reproducer. Any driver
whose tc_setup_cb_replace() fails twice in a row can hit the same loop,
so this is not a netdevsim-only issue.

Two ways to fix it:

1) Have the rollback call tc_setup_cb_add() on oldprog instead of
re-entering cls_bpf_offload_cmd().
2) Mark the rollback frame with a flag and skip a second-level
rollback from inside it.

Go with (2). It is the smaller change and keeps the original behaviour:
the rollback still goes through tc_setup_cb_replace(), so the driver
gets one real chance to restore its state. If that attempt also fails,
we just return the original error instead of recursing.

[1]: https://lore.kernel.org/bpf/ce5a6005-3c5e-4696-9e05-eba9461dc860@std.uestc.edu.cn/T/#u
Published: 2026-08-15
Score: 5.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The Linux kernel NetSched cls_bpf module contains a flaw that allows an attacker to trigger unbounded recursion during offload rollback. When cls_bpf_offload_cmd() receives a failing tc_setup_cb_replace() call twice, it recurses on itself instead of performing a controlled rollback. The recursion eventually exhausts the kernel stack, causing a crash. This weakness falls under uncontrolled recursion leading to resource exhaustion.

Affected Systems

All Linux kernel versions that include the vulnerable cls_bpf module and have not yet applied the commit that added the rollback protection. The flaw is present in any kernel that fails to incorporate the patch noted by commit identifiers 10753da2d659dd425a6e620f47f86852d604f67f and its subsequent merges.

Risk and Exploitability

With a CVSS score of 5.5, the vulnerability is considered medium severity but still poses a high risk due to kernel stack exhaustion. The EPSS score is less than 1%, indicating a low likelihood of exploitation. The issue is not listed in the CISA KEV catalog. The description does not explicitly state the attacker’s required capabilities; it is inferred that an attacker must be able to run code with sufficient privileges to inject BPF programs or modify traffic control settings in order to trigger the flaw, which could lead to local escalation or denial of service if the kernel crashes.

Generated by OpenCVE AI on August 22, 2026 at 01:22 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a version that incorporates the cls_bpf offload rollback protection (e.g., the latest mainline kernel that includes commit 10753da2d659dd425a6e620f47f86852d604f67f).
  • If an immediate upgrade is not feasible, disable the use of cls_bpf filters or restrict BPF traffic‑control programs until the kernel patch is applied.
  • Continuously monitor kernel logs for stack‑overflow crashes and apply the update as soon as it becomes available.

Generated by OpenCVE AI on August 22, 2026 at 01:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sat, 22 Aug 2026 00:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-674
CWE-754

Wed, 19 Aug 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-835
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Low


Sat, 15 Aug 2026 13:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-674
CWE-754

Sat, 15 Aug 2026 06:15:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: net/sched: cls_bpf: prevent unbounded recursion in offload rollback Quan Sun reported [1] a stack overflow in cls_bpf_offload_cmd(). Reproducer on netdevsim: add a skip_sw cls_bpf filter, set the bpf_tc_accept debugfs knob to 0, then `tc filter replace`. The replace calls tc_setup_cb_replace() which fails. cls_bpf_offload_cmd() then swaps prog/oldprog and recursively calls itself to roll back. But bpf_tc_accept=0 makes the rollback fail too, which triggers yet another rollback frame with the same arguments, and so on until the stack is exhausted. bpf_tc_accept is just a convenient knob for the reproducer. Any driver whose tc_setup_cb_replace() fails twice in a row can hit the same loop, so this is not a netdevsim-only issue. Two ways to fix it: 1) Have the rollback call tc_setup_cb_add() on oldprog instead of re-entering cls_bpf_offload_cmd(). 2) Mark the rollback frame with a flag and skip a second-level rollback from inside it. Go with (2). It is the smaller change and keeps the original behaviour: the rollback still goes through tc_setup_cb_replace(), so the driver gets one real chance to restore its state. If that attempt also fails, we just return the original error instead of recursing. [1]: https://lore.kernel.org/bpf/ce5a6005-3c5e-4696-9e05-eba9461dc860@std.uestc.edu.cn/T/#u
Title net/sched: cls_bpf: prevent unbounded recursion in offload rollback
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-08-17T05:18:20.179Z

Reserved: 2026-08-15T05:44:03.890Z

Link: CVE-2026-74382

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-15T06:22:40.040

Modified: 2026-08-17T06:19:33.073

Link: CVE-2026-74382

cve-icon Redhat

Severity : Low

Publid Date: 2026-08-15T00:00:00Z

Links: CVE-2026-74382 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-22T01:30:17Z

Weaknesses
  • CWE-835

    Loop with Unreachable Exit Condition ('Infinite Loop')