{"id":"CVE-2022-50506","aliases":["CVE-2022-50506"],"related":[],"kind":"vulnerability","state":"published","title":"drbd: only clone bio if we have a backing device","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrbd: only clone bio if we have a backing device\n\nCommit c347a787e34cb (drbd: set ->bi_bdev in drbd_req_new) moved a\nbio_set_dev call (which has since been removed) to \"earlier\", from\ndrbd_request_prepare to drbd_req_new.\n\nThe problem is that this accesses device->ldev->backing_bdev, which is\nnot NULL-checked at this point. When we don't have an ldev (i.e. when\nthe DRBD device is diskless), this leads to a null pointer deref.\n\nSo, only allocate the private_bio if we actually have a disk. This is\nalso a small optimization, since we don't clone the bio to only to\nimmediately free it again in the diskless case.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrbd: only clone bio if we have a backing device\n\nCommit c347a787e34cb (drbd: set ->bi_bdev in drbd_req_new) moved a\nbio_set_dev call (which has since been removed) to \"earlier\", from\ndrbd_request_prepare to drbd_req_new.\n\nThe problem is that this accesses device->ldev->backing_bdev, which is\nnot NULL-checked at this point. When we don't have an ldev (i.e. when\nthe DRBD device is diskless), this leads to a null pointer deref.\n\nSo, only allocate the private_bio if we actually have a disk. This is\nalso a small optimization, since we don't clone the bio to only to\nimmediately free it again in the diskless case.","source":"cvelist"}],"published":"2025-10-04T15:43:54.955Z","modified":"2026-06-17T05:23:41.180Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-476"],"affected":[{"ranges":[{"type":"git","introduced":"c347a787e34cba0e5a80a04082dacaf259105605","fixed":"05580a3bbf3cec677cb00a85dfeb21d6a9b48eaf","status":"affected"},{"type":"git","introduced":"c347a787e34cba0e5a80a04082dacaf259105605","fixed":"6d42ddf7f27b6723549ee6d4c8b1b418b59bf6b5","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.18","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.18","status":"unaffected"},{"type":"semver","introduced":"6.0.6","lastAffected":"6.0.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.18","fixed":"6.0.6"},{"status":"affected","version":"6.1"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/05580a3bbf3cec677cb00a85dfeb21d6a9b48eaf","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6d42ddf7f27b6723549ee6d4c8b1b418b59bf6b5","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-50506","url":"https://www.cve.org/CVERecord?id=CVE-2022-50506","licence":"CVE Terms of Use","modified":"2026-05-11T19:20:44.998Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-50506","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50506","licence":"Public domain","modified":"2026-06-17T05:23:41.180Z"}],"updatedAt":"2026-11-25T22:58:21.247Z","epss":{"score":0.0014,"percentile":0.03566,"date":"2026-12-01T12:00:22.000Z"}}