HomeFreeBSD

OpenZFS: Ensure that zfs_getattr() initializes the va_rdev field

Description

OpenZFS: Ensure that zfs_getattr() initializes the va_rdev field

Otherwise the field is left uninitialized, leading to a possible kernel
memory disclosure to userspace or to the network. Use the same
initialization value we use in zfsctl_common_getattr().

Reported-by: KMSAN
Sponsored-by: The FreeBSD Foundation
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ed Maste <emaste@FreeBSD.org>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>

(cherry picked from commit 11656234b560c401dec6a16e1bf048b20fd31aac)
(cherry picked from commit af1e8b52d26502bac9a2484b87d1879334debd67)

Differential Revision: https://reviews.freebsd.org/D42987

Details

Provenance
markjAuthored on Dec 7 2023, 4:20 PM
emasteCommitted on Dec 10 2023, 5:48 PM
Differential Revision
D42987: OpenZFS: Ensure that zfs_getattr() initializes the va_rdev field
Parents
rG80560eec655a: periodic/daily/480.leapfile-ntpd: only attempt to refresh leap-seconds.list
Branches
Unknown
Tags
Unknown