HomeFreeBSD

Don't overflow the kernel struct mdio in the MDIOCLIST ioctl.

Description

Don't overflow the kernel struct mdio in the MDIOCLIST ioctl.

Always terminate the list with -1 and document the ioctl behavior.
This preserves existing behavior as seen from userspace with the
addition of the unconditional termination which will not be seen by
working consumers of MDIOCLIST.

Because this ioctl can only be performed by root (in default
configurations) and is not used in the base system this bug is not
deemed to warrant either a security advisory or an eratta notice.

Reviewed by: kib
Obtained from: CheriBSD
Discussed with: security-officer (gordon)
MFC after: 3 days
Security: kernel heap buffer overflow
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D14685

Details

Provenance
brooksAuthored on
Reviewer
kib
Differential Revision
D14685: Don't overflow the kernel struct mdio in the MDIOCLIST ioctl.
Parents
rS330879: Fix lint/igor warnings
Branches
Unknown
Tags
Unknown