In the Linux kernel, the following vulnerability has been resolved:
SUNRPC: Bound-check xdr_buf_to_bvec() stores before writing
xdr_buf_to_bvec() writes a bio_vec into the caller's array before
testing whether that slot is in range, and the head branch performs
the store with no check at all. When the caller's budget is exactly
used up, the next store lands one element past the end of the array.
The overflow label returns count - 1, which masks the surplus store
but cannot undo it.
rq_bvec, the array passed by nfsd_vfs_write(), is allocated to
exactly rq_maxpages entries with no slack. The OOB store can land in
adjacent slab memory; the bv_len and bv_offset fields written there
are derived from client-supplied RPC payload sizes.
Move the in-range check ahead of the store in the head, page-loop,
and tail branches. With the check at the top of each sequence, count
is incremented only after a successful store, so the overflow label
can return count directly.
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 - Remote attackers reach xdr_buf_to_bvec() through network-facing nfsd SUNRPC on TCP/UDP port 2049 (and NFS/RDMA transports); a crafted NFS WRITE RPC supplies the xdr_buf processed by nfsd4_write()/nfsd_proc_write() into nfsd_vfs_write().
AC:L - The attacker controls NFS WRITE payload size and RPC record layout to exhaust the rq_bvec bio_vec budget; the one-element out-of-bounds store is a deterministic protocol craft, not a race or memory-layout condition outside attacker control.
PR:N - No local shell or init-namespace root is required; a remote NFS client with export write permission (typical AUTH_UNIX/AUTH_NULL mappings on misconfigured or permissive exports) can issue crafted WRITE requests after normal NFS open/stateid setup.
UI:N - Exploitation requires only attacker-initiated NFS RPC traffic to an exposed nfsd instance; no separate victim must mount shares, open files, or perform other interactive actions beyond the attacker operating their own client.
S:U - Impact is a kernel heap out-of-bounds write adjacent to the per-thread rq_bvec kmalloc array during nfsd request handling; this enables privilege escalation on the NFS server host but does not cross VM, container, or IOMMU security boundaries.
C:H - The overflow stores a full bio_vec (page pointer plus attacker-controlled bv_len and bv_offset derived from client RPC payload sizes) into adjacent slab memory; such heap corruption can disclose kernel memory and is not a bounded benign leak.
I:H - Attacker-controlled bio_vec fields are written past the end of rq_bvec into adjacent kernel heap objects, providing a memory-corruption primitive that can be developed into arbitrary kernel writes and code execution, not merely limited data alteration.
A:H - The extraneous store corrupts adjacent slab memory; on vulnerable kernels the overflow path returned count-1 without aborting nfsd_vfs_write(), so servers can kernel oops, panic, or hang during or after malformed writes 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 - Remote attackers reach xdr_buf_to_bvec() through network-facing nfsd SUNRPC on TCP/UDP port 2049 (and NFS/RDMA transports); a crafted NFS WRITE RPC supplies the xdr_buf processed by nfsd4_write()/nfsd_proc_write() into nfsd_vfs_write().
AC:L - The attacker controls NFS WRITE payload size and RPC record layout to exhaust the rq_bvec bio_vec budget; the one-element out-of-bounds store is a deterministic protocol craft, not a race or memory-layout condition outside attacker control.
PR:N - No local shell or init-namespace root is required; a remote NFS client with export write permission (typical AUTH_UNIX/AUTH_NULL mappings on misconfigured or permissive exports) can issue crafted WRITE requests after normal NFS open/stateid setup.
UI:N - Exploitation requires only attacker-initiated NFS RPC traffic to an exposed nfsd instance; no separate victim must mount shares, open files, or perform other interactive actions beyond the attacker operating their own client.
S:U - Impact is a kernel heap out-of-bounds write adjacent to the per-thread rq_bvec kmalloc array during nfsd request handling; this enables privilege escalation on the NFS server host but does not cross VM, container, or IOMMU security boundaries.
C:H - The overflow stores a full bio_vec (page pointer plus attacker-controlled bv_len and bv_offset derived from client RPC payload sizes) into adjacent slab memory; such heap corruption can disclose kernel memory and is not a bounded benign leak.
I:H - Attacker-controlled bio_vec fields are written past the end of rq_bvec into adjacent kernel heap objects, providing a memory-corruption primitive that can be developed into arbitrary kernel writes and code execution, not merely limited data alteration.
A:H - The extraneous store corrupts adjacent slab memory; on vulnerable kernels the overflow path returned count-1 without aborting nfsd_vfs_write(), so servers can kernel oops, panic, or hang during or after malformed writes even before full exploitation.
CVSS 3.1