HomeFreeBSD

nfsd: Limit parsing of layout errors to maxcnt bytes

Description

nfsd: Limit parsing of layout errors to maxcnt bytes

This patch decrements maxcnt by the appropriate
number of bytes during parsing and checks to see
if there is data remaining. If not, it just returns
from nfsrv_flexlayouterr() without further processing.
This prevents the tl pointer from running off the end
of the error data pointed at by layp, if there are
flaws in the data.

PR: 260293

(cherry picked from commit c302f889e21f73746a3b0917df5246e639df1481)

Details

Provenance
rmacklemAuthored on Dec 13 2021, 11:21 PM
Parents
rG2520c9ba7e34: qat: Address -Wunused-but-set-variable warnings
Branches
Unknown
Tags
Unknown