Junglewise Threat Intelligence

CVE-2024-27020: Linux Kernel race condition in netfilter nf_tables

CVE-2024-27020 · Severity: high · CVSS 7 · Published 2024-05-01

Technologies: Linux Kernel. Vendors: Linux.

Executive brief

A vulnerability was identified in the Linux kernel's networking subsystem (netfilter) that could allow a local user to cause system instability or potentially gain unauthorized privileges. The issue stems from a technical conflict when the system tries to look up and remove firewall rules simultaneously. This could lead to a system crash or allow an attacker to interfere with the kernel's memory.

Technical details

A race condition exists in the nf_tables component of the Linux kernel due to improper synchronization in the __nft_expr_type_get() function. Specifically, nft_unregister_expr() can run concurrently with __nft_expr_type_get() while it iterates over the nf_tables_expressions list without adequate RCU protection. This lack of locking during list iteration can lead to a data race. An attacker with local access could exploit this timing window to cause a kernel panic (DoS) or achieve arbitrary code execution in kernel mode. The fix involves implementing list_for_each_entry_rcu() and appropriate rcu_read_lock() calls to ensure thread-safe access to the expression list.

Affected products

  • Linux Linux Kernel 3.13 to 4.19.313, 4.20 to 5.4.275, 5.5 to 5.10.216, 5.11 to 5.15.157, 5.16 to 6.1.88, 6.2 to 6.6.29, 6.7 to 6.8.8

Timeline

  • 2024-04-07: other: Patch authored
  • 2024-04-27: patched: Fix committed to stable trees
  • 2024-05-01: disclosed: CVE published

References

Related threats