HomeFreeBSD

Make sure the NFS readdir client fills in all "struct dirent" data.

Description

Make sure the NFS readdir client fills in all "struct dirent" data.

The NFS client code (nfsrpc_readdir() and nfsrpc_readdirplus()) wasn't
filling in parts of the readdir reply, such as d_pad[01] and the bytes
at the end of d_name within d_reclen. As such, data left in a buffer cache
block could be leaked to userland in the readdir reply.
This patch makes sure all of the data is filled in.

Reported by: Thomas Barabosch, Fraunhofer FKIE
Reviewed by: kib, markj
MFC after: 2 weeks

Details

Provenance
rmacklemAuthored on
Reviewer
kib
Parents
rS340786: Annotate TDP_RFPPWAIT as unlikely.
Branches
Unknown
Tags
Unknown