CVE-2022-50506

drbd: only clone bio if we have a backing device

MEDIUM
5.5
CVSS Score
Published: October 4, 2025 at 03:43 PM UTC
Updated: June 17, 2026 at 05:23 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
MEDIUM5.5
Exploit prediction
EPSS 0.1%

Description

In the Linux kernel, the following vulnerability has been resolved: drbd: only clone bio if we have a backing device Commit c347a787e34cb (drbd: set ->bi_bdev in drbd_req_new) moved a bio_set_dev call (which has since been removed) to "earlier", from drbd_request_prepare to drbd_req_new. The problem is that this accesses device->ldev->backing_bdev, which is not NULL-checked at this point. When we don't have an ldev (i.e. when the DRBD device is diskless), this leads to a null pointer deref. So, only allocate the private_bio if we actually have a disk. This is also a small optimization, since we don't clone the bio to only to immediately free it again in the diskless case.

Affected

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

5.18 ≤ v < 6.0.65.18 ≤ v < 6.15.186.1 rc1c347a787e34cba0e5a80a04082dacaf259105605
Vendor states this is fixed in 05580a3bbf3cec677cb00a85dfeb21d6a9b48eaf (fixed)
Vendor states this is fixed in 6d42ddf7f27b6723549ee6d4c8b1b418b59bf6b5 (fixed)
Vendor states this is fixed in 5.18 (unaffected)
Vendor states this is fixed in 6.0.6 (unaffected)
Vendor states this is fixed in 6.1 (unaffected)

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-476

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