CVE-2022-50506 drbd: only clone bio if we have a backing device

Medium 5.5 Published Updated

A null pointer dereference in the Linux kernel DRBD module allows local attackers to cause a denial of service when using diskless devices.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2022-50506?

CVE-2022-50506 is a medium-severity vulnerability in Linux kernel, published on 4 Oct 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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.

Weakness: CWE-476

Which versions are affected by CVE-2022-50506?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2022-50506?

Apply the vendor's patch.

Is CVE-2022-50506 being exploited?

There is no known exploitation of CVE-2022-50506 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2022-50506, GHSA-2p73-743m-m4r5, UBUNTU-CVE-2022-50506.

Is CVE-2022-50506 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free