CVE-2022-49085

drbd: Fix five use after free bugs in get_initial_state

HIGH
7.8
CVSS Score
Published: February 26, 2025 at 01:54 AM UTC
Updated: August 5, 2026 at 09:24 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.3%
SSVC
No known exploit

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/

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

4.10 ≤ v < 4.14.2764.15 ≤ v < 4.19.2384.20 ≤ v < 5.4.1894.5 ≤ v < 4.14.2764.5 ≤ v < 4.19.2384.5 ≤ v < 4.9.3114.5 ≤ v < 5.10.1114.5 ≤ v < 5.15.344.5 ≤ v < 5.16.204.5 ≤ v < 5.17.34.5 ≤ v < 5.184.5 ≤ v < 5.4.1895.11 ≤ v < 5.15.345.16 ≤ v < 5.16.205.17 ≤ v < 5.17.35.5 ≤ v < 5.10.1115.18 rc1a29728463b254ce81ecefdf20c1a02e01d9361da
Vendor states this is fixed in 0489700bfeb1e53eb2039c2291c67e71b0b40103 (fixed)
Vendor states this is fixed in 188fe6b26765edbad4055611c0f788b6870f4024 (fixed)
Vendor states this is fixed in 226e993c39405292781bfcf4b039a8db56aab362 (fixed)
Vendor states this is fixed in 594205b4936771a250f9d141e7e0fff21c3dd2d9 (fixed)
Vendor states this is fixed in a972c768723359ec995579902473028fe3cd64b1 (fixed)
Vendor states this is fixed in aadb22ba2f656581b2f733deb3a467c48cc618f6 (fixed)
Vendor states this is fixed in b6a4055036eed1f5e239ce3d8b0db1ce38bba447 (fixed)
Vendor states this is fixed in dcf6be17b5c53b741898d2223b23e66d682de300 (fixed)
Vendor states this is fixed in de63e74da2333b4068bb79983e632db730fea97e (fixed)
Vendor states this is fixed in 4.14.276 (unaffected)
Vendor states this is fixed in 4.19.238 (unaffected)
Vendor states this is fixed in 4.5 (unaffected)
Vendor states this is fixed in 4.9.311 (unaffected)
Vendor states this is fixed in 5.10.111 (unaffected)
Vendor states this is fixed in 5.15.34 (unaffected)
Vendor states this is fixed in 5.16.20 (unaffected)
Vendor states this is fixed in 5.17.3 (unaffected)
Vendor states this is fixed in 5.18 (unaffected)
Vendor states this is fixed in 5.4.189 (unaffected)

References (9)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/0489700bfeb1e53eb2039c2291c67e71b0b40103
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/188fe6b26765edbad4055611c0f788b6870f4024
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/226e993c39405292781bfcf4b039a8db56aab362
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/594205b4936771a250f9d141e7e0fff21c3dd2d9
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/a972c768723359ec995579902473028fe3cd64b1
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/aadb22ba2f656581b2f733deb3a467c48cc618f6
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/b6a4055036eed1f5e239ce3d8b0db1ce38bba447
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/dcf6be17b5c53b741898d2223b23e66d682de300

SSVC — Action Prioritization

SSVCNo known exploitNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

7.8HIGHLinux
Vector?

Quick Info

StatusANALYZED
CWE
CWE-416

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card