net/sched: cls_api: Don't replay RTM_GETCHAIN in tc_ctl_chain().
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 2ed9db3074fcd8d12709fe40ff0e691d74229818 · < 503ba58481e3ba69d28127d35a39cec529f9670c| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net/sched: cls_api: Don't replay RTM_GETCHAIN in tc_ctl_chain().
If a netlink socket sends RTM_GETCHAIN requests repeatedly without recv()ing the responses, tc_ctl_chain() hogs CPU and triggers Hung Task splat. [0]
As caught in the stack trace, netlink_attachskb() could confuse tc_ctl_chain() by returning -EAGAIN when the userspace netlink socket's receive buffer is full.
The replay: label exists since commit 32a4f5ecd738 ("net: sched: introduce chain object to uapi") but was not used initially.
Since commit 9f407f1768d3 ("net: sched: introduce chain templates"), the label is needed for RTM_NEWCHAIN because tcf_proto_lookup_ops() may release RTNL to call request_module().
However, the replay logic is unnecessary for RTM_GETCHAIN.
Let's apply the replay logic only for RTM_NEWCHAIN.
From the CVE record · Linux
The Linux kernel’s traffic-control chain handler can repeatedly replay RTM_GETCHAIN requests when a netlink socket’s receive buffer is full. A local process can trigger high CPU usage and a hung-task warning by repeatedly sending these requests without reading the responses. The input does not specify authentication requirements.
Engineers running Linux kernels should check their systems; affected versions are not specified.