Page MenuHomeFreeBSD

OpenZFS: Ensure that zfs_getattr() initializes the va_rdev field
ClosedPublic

Authored by emaste on Dec 9 2023, 9:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 24, 7:57 AM
Unknown Object (File)
Thu, Oct 17, 6:11 PM
Unknown Object (File)
Oct 15 2024, 11:50 PM
Unknown Object (File)
Oct 2 2024, 8:51 PM
Unknown Object (File)
Sep 30 2024, 4:37 AM
Unknown Object (File)
Sep 19 2024, 3:19 PM
Unknown Object (File)
Sep 4 2024, 9:25 PM
Unknown Object (File)
Sep 1 2024, 3:04 AM
Subscribers

Details

Summary

cherry-picked from OpenZFS

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)

(aside: kudos to git for figuring out where the change should apply)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste requested review of this revision.Dec 9 2023, 9:52 PM

Missed in the title: this is for stable/12

This revision was not accepted when it landed; it landed in state Needs Review.Dec 10 2023, 5:49 PM
This revision was automatically updated to reflect the committed changes.