HomeFreeBSD

vmstat: fix overflow of interrupt name buffer

Description

vmstat: fix overflow of interrupt name buffer

sysctl() provides a count of number of bytes in the buffer. That is the
actual buffer length. Whereas looking for an interrupt entry with an
empty name could terminate too early, or overflow the end of the buffer.
The overflow will occur if the table of interrupt names is full.

Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D36628

Details

Provenance
ehem_freebsd_m5p.comAuthored on Nov 26 2022, 4:21 PM
kibCommitted on Jan 20 2023, 2:51 AM
Reviewer
kib
Differential Revision
D36628: vmstat: cleanup, better handle interrupts with zero count, fix sysctl interface
Parents
rGd4d797184967: vmstat: remove shadow variables
Branches
Unknown
Tags
Unknown