CVE-2022-49085·Kernel vulnerability
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/
- Severity
- high
- Software
- Kernel
- Fixed in
- 5.17.3
- Published
- 2025-02-26
Affected versions
From: 5.17
Until: 5.17.3
Fixed in: 5.17.3
How to fix this CVE
Update your Linux kernel to version 5.17.3 or later to patch five use-after-free vulnerabilities in the DRBD (Distributed Replicated Block Device) subsystem's state notification functions. These flaws occur when memory is freed prematurely during error handling in get_initial_state(), potentially allowing local privilege escalation. Apply the kernel update immediately and reboot your system to activate the patched version.
sudo dnf update kernel kernel-devel && sudo rebootDefensia detects this vulnerability
How to check if you are affected
- Run 'uname -r' to check your current kernel version; vulnerable versions are 5.17.0 through 5.17.2
- Verify DRBD is loaded with 'lsmod | grep drbd'; if present and kernel is vulnerable, the system is exposed
- Check kernel logs for memory corruption indicators: 'dmesg | grep -i "use after free\|uaf\|double free\|heap corruption"'
- Confirm the patch by running 'uname -r' after reboot; version should be 5.17.3 or higher, or a newer stable release like 5.18+
- Review /proc/version to ensure the running kernel reflects the update: 'cat /proc/version | grep -i 5.17.3'
FAQ
What is CVE-2022-49085?
CVE-2022-49085 is a set of five use-after-free memory safety bugs in the Linux kernel's DRBD notification functions that allow local attackers with limited privileges to cause memory corruption and escalate to higher privileges.
Is CVE-2022-49085 being actively exploited?
No, this CVE is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, and no public exploits are currently available, though the vulnerability is easily exploitable by local users.
What versions of Kernel are affected by CVE-2022-49085?
Linux kernel versions 5.17.0 through 5.17.2 are vulnerable; the fix was merged in kernel 5.17.3 and later stable versions.
How do I check if my server is vulnerable to CVE-2022-49085?
Run 'uname -r' and check if the output shows kernel version 5.17.0, 5.17.1, or 5.17.2, then verify DRBD is in use with 'lsmod | grep drbd'; if both are true, your system is vulnerable.
Does Defensia detect CVE-2022-49085?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2022-49085 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/0489700bfeb1e53eb2039c2291c67e71b0b40103
- https://git.kernel.org/stable/c/188fe6b26765edbad4055611c0f788b6870f4024
- https://git.kernel.org/stable/c/226e993c39405292781bfcf4b039a8db56aab362
- https://git.kernel.org/stable/c/594205b4936771a250f9d141e7e0fff21c3dd2d9
- https://git.kernel.org/stable/c/a972c768723359ec995579902473028fe3cd64b1
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2022-49085. Free for 1 server.
Get started free