Files
u-boot/net
Sebastian Josue Alba Vives d6694018ea net: nfs: fix buffer overflow in nfs_readlink_reply()
nfs_readlink_reply() validates rlen only against the incoming packet
length (inherited from CVE-2019-14195), but not against the destination
buffer nfs_path_buff[2048]. A malicious NFS server can send a valid
READLINK reply where pathlen + rlen exceeds sizeof(nfs_path_buff),
overflowing the BSS buffer into adjacent memory.

The recent fix in fd6e3d3409 addressed the same overflow class in
net/lwip/nfs.c but left the legacy path in net/nfs-common.c unpatched.

Add bounds checks before both memcpy calls in nfs_readlink_reply():
- relative path branch: reject if pathlen + rlen >= sizeof(nfs_path_buff)
- absolute path branch: reject if rlen >= sizeof(nfs_path_buff)

Fixes: cf3a4f1e86 ("net: nfs: Fix CVE-2019-14195")
Cc: stable@vger.kernel.org
Signed-off-by: Sebastian Alba Vives <sebasjosue84@gmail.com>
Reviewed-by: Jerome Forissier <jerome.forissier@arm.com>
2026-05-06 11:07:22 +02:00
..
2026-03-31 16:54:49 +02:00
2025-10-22 11:16:09 +02:00
2024-07-15 12:12:18 -06:00
2023-12-21 08:54:37 -05:00
2025-05-29 08:30:25 -06:00
2024-07-15 12:12:18 -06:00
2025-08-01 09:30:47 +02:00
2018-07-02 14:14:20 -05:00