net/sched: act_api: release all action references on NEWACTION failure
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 55334a5db5cd32b207ac697cec3ec8e078f345d4 · < 64b36eaef6ea5ada9aea4c2cf87099aaa8a4869b| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net/sched: act_api: release all action references on NEWACTION failure
When a batched RTM_NEWACTION request replaces an existing action, tcf_idr_check_alloc() takes a temporary reference on it. If a later action fails to initialize, tcf_action_destroy() uses strict release semantics to clean up the actions initialized so far. For an action bound to a filter, the strict check returns -EPERM without dropping the temporary reference.
This error also makes tcf_action_destroy() return before releasing subsequent entries. Any new action initialized between the bound action and the failing entry is leaked together with its reserved IDR slot, preventing reuse of its index.
Use tcf_idr_release() to drop each reference held by the batch without rejecting bound actions. This allows cleanup to continue through all initialized entries and preserves the module reference release when an action is destroyed. Explicit action deletion and flushing retain their separate bind-count checks.
From the CVE record · Linux
In the Linux kernel, a batched RTM_NEWACTION request can leak action references and a reserved IDR slot if it replaces an action bound to a filter and a later action fails to initialize. The leaked slot prevents reuse of its index. The input does not specify whether authentication or user interaction is required.
Engineers running the Linux kernel should check their versions; affected versions are not specified in the input.