CVE-2026-139268: net/sched: act_api: reject duplicate actions in a batch
In the Linux kernel, the following vulnerability has been resolved:
net/sched: actapi: reject duplicate actions in a batch
tcaactiongd() builds actions[] with one tcfactionget1() per nested TCAACTTAB entry. Each successful lookup takes its own reference to the resolved action, so repeated TCAACTINDEX entries in one request yield the same pointer in multiple slots.
For RTMDELACTION, tcfactiondelete() then consumes two references per slot: one in tcfactionput() and one in tcfidrdeleteindex(). A duplicate therefore drives the refcount to zero mid-walk -- the delete frees the action and removes its IDR slot -- and the next slot calls tcfactionput() on the freed action:
refcountt: underflow; use-after-free. WARNING: lib/refcount.c:87 at refcountdecnotone refcountdecandmutexlock tcfactionput tcaactiongd
Three duplicate entries are enough. Reject a repeated action while a delete batch is built, dropping the reference the extra lookup took, and return -EINVAL. RTMGETACTION balances its own references and keeps accepting duplicate entries.
Conditions to recreate the bug: tc actions add action gact index 100 tc actions delete action gact index 100 action gact index 100 \ action gact index 100
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In net/sched act_api, reject duplicate actions in a batch and return -EINVAL.
Event History
Frequently Asked Questions
What input is required to trigger the use-after-free?
An RTM_DELACTION batch must contain repeated TCA_ACT_INDEX entries that resolve to the same action. Three duplicate entries are sufficient, and the action must exist before the delete request is issued.
What can be done if the fix cannot be applied immediately?
Avoid submitting RTM_DELACTION batches with duplicate action indexes. Ensure each action appears only once in a delete batch.
How can I tell whether this condition has occurred?
Kernel logs may show a refcount warning from refcount_dec_not_one, with a call trace involving __tcf_action_put and tca_action_gd. The condition can then lead to a use-after-free during processing of the remaining duplicate entries.
Does this affect requests that retrieve actions rather than delete them?
RTM_GETACTION balances its references correctly and continues to accept duplicate entries. The described refcount underflow occurs during RTM_DELACTION processing.