CVE-2022-50506

Source
https://cve.org/CVERecord?id=CVE-2022-50506
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50506.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-50506
Downstream
Published
2025-10-04T15:43:54.955Z
Modified
2026-03-20T11:00:38.718075Z
Summary
drbd: only clone bio if we have a backing device
Details

In the Linux kernel, the following vulnerability has been resolved:

drbd: only clone bio if we have a backing device

Commit c347a787e34cb (drbd: set ->bibdev in drbdreqnew) moved a biosetdev call (which has since been removed) to "earlier", from drbdrequestprepare to drbdreq_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.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50506.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
c347a787e34cba0e5a80a04082dacaf259105605
Fixed
05580a3bbf3cec677cb00a85dfeb21d6a9b48eaf
Fixed
6d42ddf7f27b6723549ee6d4c8b1b418b59bf6b5

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50506.json"