Skip to main content

CVE-2022-48974: Vulnerability in Linux Linux

High
VulnerabilityCVE-2022-48974cvecve-2022-48974
Published: Mon Oct 21 2024 (10/21/2024, 20:05:54 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: netfilter: conntrack: fix using __this_cpu_add in preemptible Currently in nf_conntrack_hash_check_insert(), when it fails in nf_ct_ext_valid_pre/post(), NF_CT_STAT_INC() will be called in the preemptible context, a call trace can be triggered: BUG: using __this_cpu_add() in preemptible [00000000] code: conntrack/1636 caller is nf_conntrack_hash_check_insert+0x45/0x430 [nf_conntrack] Call Trace: <TASK> dump_stack_lvl+0x33/0x46 check_preemption_disabled+0xc3/0xf0 nf_conntrack_hash_check_insert+0x45/0x430 [nf_conntrack] ctnetlink_create_conntrack+0x3cd/0x4e0 [nf_conntrack_netlink] ctnetlink_new_conntrack+0x1c0/0x450 [nf_conntrack_netlink] nfnetlink_rcv_msg+0x277/0x2f0 [nfnetlink] netlink_rcv_skb+0x50/0x100 nfnetlink_rcv+0x65/0x144 [nfnetlink] netlink_unicast+0x1ae/0x290 netlink_sendmsg+0x257/0x4f0 sock_sendmsg+0x5f/0x70 This patch is to fix it by changing to use NF_CT_STAT_INC_ATOMIC() for nf_ct_ext_valid_pre/post() check in nf_conntrack_hash_check_insert(), as well as nf_ct_ext_valid_post() in __nf_conntrack_confirm(). Note that nf_ct_ext_valid_pre() check in __nf_conntrack_confirm() is safe to use NF_CT_STAT_INC(), as it's under local_bh_disable().

AI-Powered Analysis

AILast updated: 07/01/2025, 00:41:54 UTC

Technical Analysis

CVE-2022-48974 is a vulnerability in the Linux kernel's netfilter connection tracking (conntrack) subsystem. The issue arises from improper use of the __this_cpu_add() function in a preemptible context within the nf_conntrack_hash_check_insert() function. Specifically, when the nf_ct_ext_valid_pre/post() checks fail, the NF_CT_STAT_INC() macro is called, which internally uses __this_cpu_add(). This function is not safe to be called in preemptible contexts, leading to a kernel BUG and potential instability or crash. The vulnerability is rooted in concurrency and preemption handling within the kernel's connection tracking code, which is critical for network packet filtering and stateful firewall operations. The patch fixes this by replacing NF_CT_STAT_INC() with NF_CT_STAT_INC_ATOMIC() in the affected code paths, ensuring atomic operations safe for preemptible contexts. The fix also clarifies that NF_CT_STAT_INC() remains safe under local_bh_disable() contexts, as used elsewhere in the code. No known exploits are reported in the wild, and the vulnerability affects specific Linux kernel versions identified by commit hashes. This flaw could lead to kernel panics or denial of service due to improper synchronization in a core networking component.

Potential Impact

For European organizations, this vulnerability could have significant impact on systems running vulnerable Linux kernel versions, especially those acting as network gateways, firewalls, or routers using netfilter/conntrack for stateful packet inspection. Exploitation could cause kernel crashes leading to denial of service, disrupting critical network infrastructure and services. This is particularly concerning for enterprises, ISPs, and cloud providers relying on Linux-based network appliances. While no direct code execution or privilege escalation is indicated, the resulting instability could be leveraged in multi-stage attacks or cause operational outages. Given the widespread use of Linux in European data centers, telecom infrastructure, and government networks, the vulnerability poses a risk to availability and network reliability. The lack of known exploits reduces immediate threat, but unpatched systems remain vulnerable to accidental or malicious triggers causing service disruption.

Mitigation Recommendations

European organizations should promptly apply the official Linux kernel patches that replace NF_CT_STAT_INC() with NF_CT_STAT_INC_ATOMIC() in the affected conntrack code paths. Kernel updates from trusted Linux distributions should be prioritized, especially for systems functioning as firewalls or network routers. Network administrators should audit their Linux kernel versions against the affected commits and schedule maintenance windows for patch deployment. Additionally, monitoring kernel logs for BUG traces related to __this_cpu_add() usage can help detect attempts to trigger the flaw. Employing kernel live patching solutions where available can reduce downtime during patching. Organizations should also review their network segmentation and firewall configurations to limit exposure of vulnerable systems to untrusted networks. Finally, maintaining robust backup and recovery procedures will mitigate impact from potential denial of service incidents.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-08-22T01:27:53.631Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d982fc4522896dcbe67bc

Added to database: 5/21/2025, 9:09:03 AM

Last enriched: 7/1/2025, 12:41:54 AM

Last updated: 8/11/2025, 6:37:37 AM

Views: 11

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats