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, Sep 7, 7:47 PM
Unknown Object (File)
Sun, Sep 6, 9:43 AM
Unknown Object (File)
Sun, Sep 6, 6:59 AM
Unknown Object (File)
Sun, Sep 6, 2:48 AM
Unknown Object (File)
Sat, Sep 5, 9:04 PM
Unknown Object (File)
Fri, Aug 28, 1:48 AM
Unknown Object (File)
Mon, Aug 24, 1:32 PM
Unknown Object (File)
Aug 19 2026, 7:14 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