]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
vfs: Fix error handling in vn_fullpath_hardlink()
authorMark Johnston <markj@FreeBSD.org>
Tue, 11 May 2021 00:18:00 +0000 (20:18 -0400)
committerMateusz Guzik <mjg@FreeBSD.org>
Sat, 22 May 2021 18:33:16 +0000 (18:33 +0000)
commit8b59c6af27d188f6f32800a34b872c9415533895
tree4d12764766e99567f7b61f2a42d1ed988a4ed13a
parenta9d418fbb843927fe193d19616ddef48c50ae206
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)
sys/kern/vfs_cache.c