HomeFreeBSD

devstat: Fix a kernel stack disclosure

Description

devstat: Fix a kernel stack disclosure

The 16-byte "device_name" field was not zero-filled, so could contain
uninitialized stack data. Zero the whole struct, as that's the
prevailing pattern for this kind of conversion code, and it's more
robust in the face of future revisions to struct devstat.

Reviewed by: olce, kib
Reported by: Reo Shiseki
Fixes: a11d132f6c62 ("devstat: Provide 32-bit compatibility")
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D59309

(cherry picked from commit 7cb1a76f88158fb690418336b736e66c238cd4f7)

Details

Provenance
markjAuthored on Sep 1 2026, 4:07 PM
Reviewer
rGa11d132f6c62: devstat: Provide 32-bit compatibility
Differential Revision
D59309: devstat: Fix a kernel stack disclosure
Parents
rGb1f63c6ab7df: ipfilter: Avoid negative array indicies
Branches
Unknown
Tags
Unknown