CVE-2024-27020 netfilter: nf_tables: Fix potential data-race in __nft_expr_type_get()

High 7.8 Published Updated

A data race in the Linux kernel netfilter subsystem can lead to undefined behavior during expression type lookups.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2024-27020?

CVE-2024-27020 is a high-severity vulnerability in Linux kernel, published on 1 May 2024. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

In the Linux kernel, the following vulnerability has been resolved:

netfilter: nf_tables: Fix potential data-race in __nft_expr_type_get()

nft_unregister_expr() can concurrent with __nft_expr_type_get(), and there is not any protection when iterate over nf_tables_expressions list in __nft_expr_type_get(). Therefore, there is potential data-race of nf_tables_expressions list entry.

Use list_for_each_entry_rcu() to iterate over nf_tables_expressions list in __nft_expr_type_get(), and use rcu_read_lock() in the caller nft_expr_type_get() to protect the entire type query process.

Weakness: CWE-362

Which versions are affected by CVE-2024-27020?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-27020?

Apply the vendor's patch.

Is CVE-2024-27020 being exploited?

There is no known exploitation of CVE-2024-27020 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as AZL-42192, BELL-CVE-2024-27020, DEBIAN-CVE-2024-27020, GHSA-rhrr-35q8-4p7f, UBUNTU-CVE-2024-27020.

Is CVE-2024-27020 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free