CVE-2022-50506

published 4 Oct 2025 · updated 11 May 2026

drbd: only clone bio if we have a backing device

5.0MediumEPSS 0%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel 05580a3bbf3cec677cb00a85dfeb21d6a9b48eaf and Kernel 6d42ddf7f27b6723549ee6d4c8b1b418b59bf6b5.

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

Vendors, products and packages with version ranges

VendorProductVersionsFixed
LinuxKernel=5.18, >=c347a787e34cba0e5a80a04082dacaf259105605 <05580a3bbf3cec677cb00a85dfeb21d6a9b48eaf, >=c347a787e34cba0e5a80a04082dacaf259105605 <6d42ddf7f27b6723549ee6d4c8b1b418b59bf6b505580a3bbf3cec677cb00a85dfeb21d6a9b48eaf, 6d42ddf7f27b6723549ee6d4c8b1b418b59bf6b5

Timeline

Every event on this vulnerability

Related

Other vulnerabilities in Kernel, strongest first

Embed

A live severity badge for an advisory, README or ticket

CVE-2022-50506 severity on Zeptric[![CVE-2022-50506](https://zeptric.io/badge/cve/CVE-2022-50506.svg)](https://zeptric.io/cve/CVE-2022-50506)