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
Unknown Object (File)
Mon, Mar 2, 8:11 PM
Unknown Object (File)
Mon, Mar 2, 8:11 PM
Unknown Object (File)
Mon, Mar 2, 8:11 PM
Unknown Object (File)
Mon, Mar 2, 8:10 PM
Unknown Object (File)
Mon, Mar 2, 1:30 AM
Unknown Object (File)
Sat, Feb 28, 12:54 PM
Unknown Object (File)
Tue, Feb 17, 3:39 AM
Unknown Object (File)
Mon, Feb 16, 12:35 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