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.
CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 9.8
AV:N - Exploitation is delivered over the DRBD replication TCP protocol when a victim node receives a malicious P_DATA_REPLY from its peer or a man-in-the-middle on that link; recv_dless_read() is reached from drbdd() without any local syscall or ioctl on the victim.
AC:L - The peer fully controls the wire length in the P_DATA_REPLY header, and two independent triggers (unsigned-to-signed overflow or digest subtraction underflow) deterministically force expect negative so drbd_recv_all_warn() receives SIZE_MAX bytes whenever the victim issues a remote read.
PR:N - No account, capability, or administrative access on the victim host is required; a malicious DRBD peer or network man-in-the-middle on the replication link can send the crafted reply after connection setup, and cram-hmac-alg peer authentication is optional.
UI:N - No end-user action is needed because diskless-primary and read-balancing configurations automatically send P_DATA_REQUEST packets to the peer, and the malicious P_DATA_REPLY is processed in the kernel receiver thread during normal I/O.
S:U - The out-of-bounds socket receive corrupts kernel memory on the same host that runs DRBD; successful exploitation yields kernel compromise on that node but does not by itself cross a VM, container, or IOMMU security boundary.
C:H - Receiving up to SIZE_MAX attacker-controlled bytes past the mapped bio page is an out-of-bounds kernel write that can corrupt adjacent heap or page data and be leveraged for arbitrary kernel memory disclosure, not merely a bounded leak.
I:H - The bug copies attacker-chosen network data beyond the allocated bio buffer boundary, providing a kernel out-of-bounds write primitive that can corrupt kernel structures and enable arbitrary code execution or privilege escalation.
A:H - Writing gigabytes past a bio page can immediately corrupt critical kernel memory and cause oops or panic, and repeated malicious replies can keep the node unavailable even before full exploitation.
| Attack Vector |
Network |
Scope |
Unchanged |
| Attack Complexity |
Low |
Confidentiality Impact |
High |
| Privileges Required |
None |
Integrity Impact |
High |
| User Interaction |
None |
Availability Impact |
High |
AV:N - Exploitation is delivered over the DRBD replication TCP protocol when a victim node receives a malicious P_DATA_REPLY from its peer or a man-in-the-middle on that link; recv_dless_read() is reached from drbdd() without any local syscall or ioctl on the victim.
AC:L - The peer fully controls the wire length in the P_DATA_REPLY header, and two independent triggers (unsigned-to-signed overflow or digest subtraction underflow) deterministically force expect negative so drbd_recv_all_warn() receives SIZE_MAX bytes whenever the victim issues a remote read.
PR:N - No account, capability, or administrative access on the victim host is required; a malicious DRBD peer or network man-in-the-middle on the replication link can send the crafted reply after connection setup, and cram-hmac-alg peer authentication is optional.
UI:N - No end-user action is needed because diskless-primary and read-balancing configurations automatically send P_DATA_REQUEST packets to the peer, and the malicious P_DATA_REPLY is processed in the kernel receiver thread during normal I/O.
S:U - The out-of-bounds socket receive corrupts kernel memory on the same host that runs DRBD; successful exploitation yields kernel compromise on that node but does not by itself cross a VM, container, or IOMMU security boundary.
C:H - Receiving up to SIZE_MAX attacker-controlled bytes past the mapped bio page is an out-of-bounds kernel write that can corrupt adjacent heap or page data and be leveraged for arbitrary kernel memory disclosure, not merely a bounded leak.
I:H - The bug copies attacker-chosen network data beyond the allocated bio buffer boundary, providing a kernel out-of-bounds write primitive that can corrupt kernel structures and enable arbitrary code execution or privilege escalation.
A:H - Writing gigabytes past a bio page can immediately corrupt critical kernel memory and cause oops or panic, and repeated malicious replies can keep the node unavailable even before full exploitation.
CVSS 3.1