A vulnerability has been identified in the Netfilter subsystem (CVE-2023-6817), potentially allowing a local user to escalate their privileges in the system. The issue is caused by a use-after-free memory access in the nf_tables module, which supports the operation of the nftables packet filter. The vulnerability has been present since Linux kernel version 5.6. A fix for the vulnerability has been proposed in the test release of the Linux kernel 6.7-rc5 and has been backported to the current stable branches 5.10.204, 5.15.143, 6.1.68, and 6.6.7.
The problem is due to an error in the nft_pipapo_walk function, which did not check for duplicates during the iteration over PIPAPO (Pile Packet Policies) elements, leading to double free of memory. To conduct an attack, access to nftables is required, which can be obtained with CAP_NET_ADMIN privileges in any user namespace or network namespace, which may be granted, for example, in isolated containers. A prototype exploit has been published for testing systems.
Source: opennet.ru
