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

(cherry picked from commit c8bbb1272c8bc103cfaa42c7a1639f42b62483dd)

Details

Provenance
markjAuthored on May 11 2021, 12:18 AM
mjgCommitted on May 22 2021, 6:33 PM
Reviewer
mjg
Differential Revision
D30198: vfs: Fix error handling in vn_fullpath_hardlink()
Parents
rGa9d418fbb843: zfs: use vn_seqc_read_notmodify for racing .. lookups
Branches
Unknown
Tags
Unknown