Linux
drbd: reject data replies with an out-of-range payload size
In the Linux kernel, the following vulnerability has been resolved: drbd: reject data replies with an out-of-range payload size recv_dless_read() receives a P_DATA_REPLY from a peer into the bio of an outstanding read request. The peer-supplied payload length reaches it as the signed int data_size, and two peer-controlled inputs can make it negative. With a negotiated data-integrity-alg the digest length is subtracted first, so a reply whose payload is smaller than the digest underflows data_size. With no integrity algorithm (the default) data_size is assigned from the unsigned h95/h100 wire length and drbdd() never bounds it for a payload-carrying command, so a length above INT_MAX casts it negative; this path needs no non-default feature. The bio receive loop then computes expect = min_t(int, data_size, bv_len), which is negative, and drbd_recv_all_warn(mapped, expect) receives with a size_t of SIZE_MAX into the first mapped page. The sibling receive path read_in_block() is not affected: it uses an unsigned size and rejects it against DRBD_MAX_BIO_SIZE before receiving. Reject a data reply whose size is negative after the optional digest subtraction, covering both triggers. Impact: a malicious or man-in-the-middle DRBD peer copies attacker-chosen bytes past a bio page in the receiver, corrupting kernel memory. A node that reads from its peer (a diskless node, or read-balancing to the peer) is exposed in the default configuration; data-integrity-alg is not required.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= b411b3637fa71fce9cf2acf0639009500f5892fe, < bca33f5442c3094511719d9db792ce3165d87e76
- >= b411b3637fa71fce9cf2acf0639009500f5892fe, < 741a682535deffe9ab7e5c89caf83571efbc9dd9
- >= b411b3637fa71fce9cf2acf0639009500f5892fe, < f14e87d7b166490bceb9603b39310e51595d05b9
- >= b411b3637fa71fce9cf2acf0639009500f5892fe, < f16866c62656865854106b79bcf6e4ca97a51a92
- >= b411b3637fa71fce9cf2acf0639009500f5892fe, < 5f59a8142000f0b8f75c432209ead73c424a745d
- >= b411b3637fa71fce9cf2acf0639009500f5892fe, < 38cc4867540ae8beedfe41a1a1a6ed37052c77d6
- >= b411b3637fa71fce9cf2acf0639009500f5892fe, < 648d4317326e6aa3f8c05cbf0fd14cc2eba6ca99
- >= b411b3637fa71fce9cf2acf0639009500f5892fe, < bd910a7660d280595ef94cb6d193951d855d330f
Fixed in bca33f5442c3094511719d9db792ce3165d87e76, 741a682535deffe9ab7e5c89caf83571efbc9dd9, f14e87d7b166490bceb9603b39310e51595d05b9, f16866c62656865854106b79bcf6e4ca97a51a92, 5f59a8142000f0b8f75c432209ead73c424a745d, 38cc4867540ae8beedfe41a1a1a6ed37052c77d6, 648d4317326e6aa3f8c05cbf0fd14cc2eba6ca99, bd910a7660d280595ef94cb6d193951d855d330f
- 2.6.33
Fixed in 0, 5.10.261, 5.15.212, 6.1.178, 6.6.145, 6.12.97, 6.18.40, 7.1.5, 7.2
Mitigation
Upgrade Linux to bca33f5442c3094511719d9db792ce3165d87e76 or 741a682535deffe9ab7e5c89caf83571efbc9dd9 or f14e87d7b166490bceb9603b39310e51595d05b9 or f16866c62656865854106b79bcf6e4ca97a51a92 or 5f59a8142000f0b8f75c432209ead73c424a745d or 38cc4867540ae8beedfe41a1a1a6ed37052c77d6 or 648d4317326e6aa3f8c05cbf0fd14cc2eba6ca99 or bd910a7660d280595ef94cb6d193951d855d330f or later.
Upgrade Linux to 0 or 5.10.261 or 5.15.212 or 6.1.178 or 6.6.145 or 6.12.97 or 6.18.40 or 7.1.5 or 7.2 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.