VYPR
Medium severity5.5NVD Advisory· Published Oct 4, 2025· Updated Jun 17, 2026

CVE-2022-50506

CVE-2022-50506

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 products

5
  • osv-coords
    Range: >= 5.18.0, < 6.0.6
  • Linux/Kernelcpe-rescue4 versions
    5.18+ 3 more
    • (no CPE)range: 5.18
    • (no CPE)
    • cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*range: >=5.18,<6.0.6
    • cpe:2.3:o:linux:linux_kernel:6.1:rc1:*:*:*:*:*:*

Patches

Vulnerability mechanics

References

2

News mentions

0

No linked articles in our index yet.