Page MenuHomeFreeBSD

nfs_clrpcops.c: Check for too large a write reply
ClosedPublic

Authored by rmacklem on Oct 26 2025, 8:52 PM.
Tags
None
Referenced Files
F160198287: D53368.id165129.diff
Mon, Jun 22, 2:41 AM
Unknown Object (File)
Sat, Jun 20, 12:09 PM
Unknown Object (File)
Mon, Jun 8, 8:33 AM
Unknown Object (File)
Tue, Jun 2, 2:39 PM
Unknown Object (File)
Wed, May 27, 8:20 PM
Unknown Object (File)
May 2 2026, 4:40 PM
Unknown Object (File)
Apr 28 2026, 1:37 PM
Unknown Object (File)
Apr 27 2026, 12:28 PM
Subscribers

Details

Summary

The "rlen" reply length for a Write operation/RPC
could cause trouble if a broken server replies with
too large a value.

Improve the sanity check for "rlen" to avoid this.

Test Plan

Tested only for a non-bogus NFS server.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

There is a similar pattern in nfsrpc_writeds(). Does that need to be fixed too?

Add the same fix to nfsrpc_writeds().

There is a similar pattern in nfsrpc_writeds(). Does that need to be fixed too?

Yep, good catch! Might as well fix them both.

This revision is now accepted and ready to land.Oct 27 2025, 2:09 PM