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, Aug 24, 1:32 PM
Unknown Object (File)
Wed, Aug 19, 7:14 AM
Unknown Object (File)
Tue, Aug 18, 4:04 AM
Unknown Object (File)
Wed, Aug 12, 5:01 PM
Unknown Object (File)
Tue, Aug 11, 7:00 PM
Unknown Object (File)
Mon, Aug 10, 5:09 PM
Unknown Object (File)
Mon, Aug 10, 4:22 PM
Unknown Object (File)
Mon, Aug 10, 4:20 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