Skip to main content

CVE-2022-49085: Vulnerability in Linux Linux

High
VulnerabilityCVE-2022-49085cvecve-2022-49085
Published: Wed Feb 26 2025 (02/26/2025, 01:54:43 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: drbd: Fix five use after free bugs in get_initial_state In get_initial_state, it calls notify_initial_state_done(skb,..) if cb->args[5]==1. If genlmsg_put() failed in notify_initial_state_done(), the skb will be freed by nlmsg_free(skb). Then get_initial_state will goto out and the freed skb will be used by return value skb->len, which is a uaf bug. What's worse, the same problem goes even further: skb can also be freed in the notify_*_state_change -> notify_*_state calls below. Thus 4 additional uaf bugs happened. My patch lets the problem callee functions: notify_initial_state_done and notify_*_state_change return an error code if errors happen. So that the error codes could be propagated and the uaf bugs can be avoid. v2 reports a compilation warning. This v3 fixed this warning and built successfully in my local environment with no additional warnings. v2: https://lore.kernel.org/patchwork/patch/1435218/

AI-Powered Analysis

AILast updated: 07/03/2025, 03:27:20 UTC

Technical Analysis

CVE-2022-49085 is a high-severity vulnerability affecting the Linux kernel's DRBD (Distributed Replicated Block Device) subsystem. The flaw involves multiple use-after-free (UAF) bugs in the get_initial_state function and related notification functions such as notify_initial_state_done and notify_*_state_change. Specifically, when get_initial_state calls notify_initial_state_done with a certain argument condition (cb->args[5] == 1), if the genlmsg_put() function fails inside notify_initial_state_done, the socket buffer (skb) is freed by nlmsg_free(skb). However, get_initial_state subsequently attempts to use the freed skb by accessing skb->len, leading to a use-after-free condition. This issue is compounded by similar UAF bugs in the notification chain functions, resulting in a total of five distinct UAF vulnerabilities. The root cause is the improper error handling and failure to propagate error codes from callee functions, which leads to continued use of freed memory. The vulnerability is tracked under CWE-416 (Use After Free) and has a CVSS v3.1 score of 7.8, indicating high severity. Exploitation requires local privileges (AV:L), low attack complexity (AC:L), and low privileges (PR:L), but no user interaction (UI:N). Successful exploitation could lead to full compromise of confidentiality, integrity, and availability of the affected system. The vulnerability has been patched by modifying the callee functions to return error codes upon failure, allowing the caller to avoid using freed memory. No known exploits are currently reported in the wild.

Potential Impact

For European organizations, this vulnerability poses a significant risk, especially for those running Linux servers with DRBD enabled for high availability and data replication. Exploitation could allow a local attacker with limited privileges to execute arbitrary code, cause denial of service through kernel crashes, or escalate privileges, potentially leading to full system compromise. This could disrupt critical services, cause data loss or corruption, and impact business continuity. Given the widespread use of Linux in European data centers, cloud infrastructures, and industrial control systems, the impact could extend to sectors such as finance, healthcare, manufacturing, and government. The confidentiality of sensitive data could be breached, integrity of replicated data compromised, and availability of critical systems jeopardized. The requirement for local access limits remote exploitation but insider threats or attackers who gain initial foothold could leverage this vulnerability to deepen their control.

Mitigation Recommendations

European organizations should prioritize patching Linux kernels to versions that include the fix for CVE-2022-49085. Since the vulnerability is in the DRBD subsystem, organizations using DRBD should verify their kernel versions and apply vendor-provided patches promptly. Additionally, implement strict access controls to limit local user privileges and restrict who can execute code or access DRBD-related interfaces. Employ kernel hardening techniques such as Kernel Address Space Layout Randomization (KASLR), and enable security modules like SELinux or AppArmor to reduce exploitation likelihood. Regularly audit systems for unusual kernel crashes or suspicious local activity that might indicate exploitation attempts. For environments where immediate patching is not feasible, consider disabling DRBD or restricting its usage until patched. Finally, maintain robust monitoring and incident response capabilities to detect and respond to potential exploitation attempts quickly.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2025-02-26T01:49:39.248Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d982fc4522896dcbe6ae4

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

Last enriched: 7/3/2025, 3:27:20 AM

Last updated: 8/14/2025, 4:00:17 PM

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