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)
Sat, Jun 8, 2:33 AM
Unknown Object (File)
Mar 15 2024, 1:18 AM
Unknown Object (File)
Mar 15 2024, 1:18 AM
Unknown Object (File)
Mar 15 2024, 1:08 AM
Unknown Object (File)
Mar 11 2024, 9:44 AM
Unknown Object (File)
Dec 30 2023, 11:12 PM
Unknown Object (File)
Dec 24 2023, 2:10 PM
Unknown Object (File)
Dec 10 2023, 5:49 PM
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

Lint
Lint Skipped
Unit
Tests Skipped

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.