Home

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.

PUBLISHED Reserved 2025-10-04 | Published 2025-10-04 | Updated 2025-10-04 | Assigner Linux

Product status

Default status
unaffected

c347a787e34cba0e5a80a04082dacaf259105605 before 05580a3bbf3cec677cb00a85dfeb21d6a9b48eaf
affected

c347a787e34cba0e5a80a04082dacaf259105605 before 6d42ddf7f27b6723549ee6d4c8b1b418b59bf6b5
affected

Default status
affected

5.18
affected

Any version before 5.18
unaffected

6.0.6
unaffected

6.1
unaffected

References

git.kernel.org/...c/05580a3bbf3cec677cb00a85dfeb21d6a9b48eaf

git.kernel.org/...c/6d42ddf7f27b6723549ee6d4c8b1b418b59bf6b5

cve.org (CVE-2022-50506)

nvd.nist.gov (CVE-2022-50506)

Download JSON