HomeFreeBSD

kevent: Prohibit negative change and event list lengths

Description

kevent: Prohibit negative change and event list lengths

Previously, a negative change list length would be treated the same as
an empty change list. A negative event list length would result in
bogus copyouts. Make kevent(2) return EINVAL for both cases so that
application bugs are more easily found, and to be more robust against
future changes to kevent internals.

Reviewed by: imp, kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D30480

Details

Provenance
markjAuthored on May 27 2021, 7:49 PM
Reviewer
imp
Differential Revision
D30480: kevent: Prohibit negative change and event list lengths
Parents
rGf88510077377: ktrace: Handle negative array sizes in ktrstructarray
Branches
Unknown
Tags
Unknown