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
rGdaaaeb3051bf: vnet: (read) lock the vnet list while iterating it
Branches
Unknown
Tags
Unknown