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)
Sat, Jan 10, 1:25 PM
Unknown Object (File)
Sun, Dec 28, 3:13 AM
Unknown Object (File)
Fri, Dec 26, 4:15 AM
Unknown Object (File)
Fri, Dec 19, 1:00 PM
Unknown Object (File)
Dec 16 2025, 4:07 PM
Unknown Object (File)
Dec 16 2025, 3:59 PM
Unknown Object (File)
Dec 14 2025, 4:07 AM
Unknown Object (File)
Dec 8 2025, 8:15 AM
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