A critical vulnerability (CVE-2022-1016) has been discovered in the Linux kernel that affects the net/netfilter/nf_tables_core.c file, specifically in the "nft_do_chain" function. This flaw can lead to a use-after-free scenario and eventually result in a kernel information leak. An unprivileged attacker can locally exploit this issue to gain unauthorized access to sensitive data within the kernel.

Code Snippet

The flaw is present in the Linux kernel's "nft_do_chain" function within the net/netfilter/nf_tables_core.c file. Here is a relevant code snippet from this file:

static unsigned int nft_do_chain(void *priv, struct sk_buff *skb,
					    const struct nf_hook_state *state)
	struct nft_pktinfo pkt;

	/* Initialize the packet information structure */
	nft_pktinfo_init(&pkt, skb, state);

	return nft_do_chain_pkt(priv, &pkt);

Exploit Details

The vulnerability in the "nft_do_chain" function can be exploited by triggering a race condition, which occurs when two or more threads access shared data concurrently. The race condition leads to a use-after-free situation where the kernel continues to use memory that has been deallocated, causing unpredictable and potentially malicious outcomes.

An unprivileged attacker with local access to the target system can exploit this issue to cause a kernel information leak. The attacker could potentially retrieve sensitive data from the kernel, such as cryptographic material, internal data structures, and other valuable information.

References and Further Reading

1. Official Linux Kernel Repository – For an in-depth view of the Linux kernel source code, you can refer to its official repository.
2. Linux Kernel Mailing List – The mailing list frequently contains discussions about security vulnerabilities, patches, and related topics.
3. National Vulnerability Database (NVD) Entry – For more information about CVE-2022-1016, you can check the National Vulnerability Database entry for this specific issue.


CVE-2022-1016 is a critical vulnerability in the Linux kernel that can cause a use-after-free scenario and potentially lead to a kernel information leak if exploited by an unprivileged attacker with local access to the target system. It is essential for system administrators and Linux kernel developers to stay informed about such vulnerabilities, apply patches diligently, and maintain a strong security posture to minimize the risk of such attacks.


Published on: 08/29/2022 15:15:00 UTC
Last modified on: 09/08/2022 13:15:00 UTC