CVE-2023-4206: Use-after-free in Linux kernel's net/sched: cls_route component
A flaw in the Linux Kernel found. Use after free in the net/sched classifiers (clsfw, clsu32 and clsroute) can happen because of mainline/net/sched/clsfw.c incorrect handling of the existing filter in .change method that leads to an extra unbindtcf call for the associated class and that allows that class to be removed while it's still used. These bugs can be used for a local privilege escalation.
Upstream patch: https://lore.kernel.org/netdev/193d6cdf-d6c9-f9be-c36a-b2a7551d5fb6@mojatatu.com/
Other sources
A use-after-free vulnerability in the Linux kernel's net/sched: clsroute component can be exploited to achieve local privilege escalation.
When route4change() is called on an existing filter, the whole tcfresult struct is always copied into the new instance of the filter. This causes a problem when updating a filter bound to a class, as tcfunbindfilter() is always called on the old instance in the success path, decreasing filtercnt of the still referenced class and allowing it to be deleted, leading to a use-after-free.
We recommend upgrading past commit b80b829e9e2c1b3f7aae34855e04d8f6ecaf13c8.
— MITRE
Linux Kernel could allow a local authenticated attacker to gain elevated privileges on the system, caused by a use-after-free flaw in the net/sched: clsroute component. By sending a specially crafted request, an authenticated attacker could exploit this vulnerability to gain elevated privileges.
— IBM
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.197-1Fixed in 5.10.191-1Fixed in 6.1.66-1Fixed in 6.1.69-1Fixed in 6.5.13-1Fixed in 6.6.9-1 - Upgrade
Upgrade
F5 Traffix Systems Signaling Delivery Controllerto a version that resolves this vulnerability.Fixed in 5.2.0 - Upgrade
Upgrade
redhat/Kernelto a version that resolves this vulnerability.Fixed in 6.5 - Upgrade
Upgrade
Linux kernel net/sched: cls_fwto a version that resolves this vulnerability.Patch 3044b16e7c6fe5d24b1cdbcf1bd0a9d92d1ebd81 - Upgrade
Upgrade
Linux kernel net/sched: cls_routeto a version that resolves this vulnerability.Patch 76e42ae831991c828cffa8c37736ebfb831ad5ec - Upgrade
Upgrade
Linux kernel net/sched: cls_u32to a version that resolves this vulnerability.Patch b80b829e9e2c1b3f7aae34855e04d8f6ecaf13c8
Event History
Frequently Asked Questions
What is CVE-2023-4206?
CVE-2023-4206 is a use-after-free vulnerability in the Linux kernel's net/sched: cls_route component that can be exploited to achieve local privilege escalation.
How can CVE-2023-4206 be exploited?
CVE-2023-4206 can be exploited by calling route4_change() on an existing filter, which causes a problem with the tcf_result struct that is copied into the new instance of the filter.
What is the severity of CVE-2023-4206?
The severity of CVE-2023-4206 is high with a CVSS score of 7.8.
Which software versions are affected by CVE-2023-4206?
Linux Kernel versions up to 6.5 and Debian Linux versions 12.0 are affected by CVE-2023-4206.
How can I fix CVE-2023-4206?
To fix CVE-2023-4206, update your Linux Kernel to version 6.5.3-1 or newer, or update your Debian Linux to version 12.0 or newer.