HomeFreeBSD

tty: Avoid a kernel memory discloure via kern.ttys

Description

tty: Avoid a kernel memory discloure via kern.ttys

Four pad bytes at the end of each xtty structure were not being cleared
before being copied out. Fix this by clearing the whole structure
before populating fields.

MFC after: 3 days
Reported by: KMSAN

(cherry picked from commit 3c0fb026b2fc998fa9bea8aed76e96c58671aee3)

Details

Provenance
markjAuthored on Dec 11 2023, 2:19 PM
Parents
rGa9dcfac2fd6a: OpenZFS: Ensure that zfs_getattr() initializes the va_rdev field
Branches
Unknown
Tags
Unknown