HomeFreeBSD

vfs: Fix error handling in vn_fullpath_hardlink()

Description

vfs: Fix error handling in vn_fullpath_hardlink()

vn_fullpath_any_smr() will return a positive error number if the
caller-supplied buffer isn't big enough. In this case the error must be
propagated up, otherwise we may copy out uninitialized bytes.

Reported by: syzkaller+KMSAN
Reviewed by: mjg, kib
MFC aftr: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D30198

Details

Provenance
markjAuthored on May 11 2021, 12:18 AM
Reviewer
mjg
Differential Revision
D30198: vfs: Fix error handling in vn_fullpath_hardlink()
Parents
rG630caa95d461: rtld: preserve the 'seen' state of the dlerror message in errmsg_save()
Branches
Unknown
Tags
Unknown