HomeFreeBSD

nfsd: Add a sanity check for Owner/OwnerGroup string length

Description

nfsd: Add a sanity check for Owner/OwnerGroup string length

Robert Morris reported that, if a client sends an absurdly
large Owner/OwnerGroup string, the kernel malloc() for the
large size string can block forever.

This patch adds a sanity limit for Owner/OwnerGroup string
length. Since the RFCs do not specify any limit and FreeBSD
can handle a group name greater than 1Kbyte, the limit is
set at a generous 10Kbytes.

Reported by: rtm@lcs.mit.edu
PR: 260546
MFC after: 2 weeks

Details

Provenance
rmacklemAuthored on May 4 2022, 8:58 PM
Parents
rGf32bf50d43be: nfsd: Fix handling of Open/Create for the pNFS server
Branches
Unknown
Tags
Unknown