CVE-2023-4207: Use-after-free in Linux kernel's net/sched: cls_fw 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: clsfw component can be exploited to achieve local privilege escalation.
When fwchange() 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 76e42ae831991c828cffa8c37736ebfb831ad5ec.
— 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: clsfw component. By sending a specially crafted request, an authenticated attacker could exploit this vulnerability to gain elevated privileges.
— IBM
Affected Software
Remediation
Event History
Frequently Asked Questions
What is CVE-2023-4207?
CVE-2023-4207 is a use-after-free vulnerability in the Linux kernel's net/sched: cls_fw component that can be exploited to achieve local privilege escalation.
How severe is CVE-2023-4207?
CVE-2023-4207 has a severity rating of 7.8 (High).
Which software is affected by CVE-2023-4207?
CVE-2023-4207 affects the Linux Kernel versions up to 6.5, Debian Linux 12.0, and certain versions of the 'linux' package from the Debian repository.
How can CVE-2023-4207 be fixed on Linux?
To fix CVE-2023-4207 on Linux, it is recommended to update to version 5.10.191-1, 6.1.52-1, or 6.5.3-1 of the 'linux' package provided by the Debian repository, or update to a patched version of the Linux Kernel.
Are there any references for CVE-2023-4207?
Yes, you can find references for CVE-2023-4207 at the following URLs: [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=76e42ae831991c828cffa8c37736ebfb831ad5ec [2] https://kernel.dance/76e42ae831991c828cffa8c37736ebfb831ad5ec [3] https://www.debian.org/security/2023/dsa-5492