freebsd-dev/sys/dev/mps
Ed Maste 8276c4149b mpr/mps/mpt: verify cfg page ioctl lengths
*_CFG_PAGE ioctl handlers in the mpr, mps, and mpt drivers allocated a
buffer of a caller-specified size, but copied to it a fixed size header.
Add checks that the size is at least the required minimum.

Note that the device nodes are owned by root:operator with 0640
permissions so the ioctls are not available to unprivileged users.

This change includes suggestions from scottl, markj and mav.

Two of the mpt cases were reported by Lucas Leong (@_wmliang_) of
Trend Micro Zero Day Initiative; scottl reported the third case in mpt.
Same issue found in mpr and mps after discussion with imp.

Reported by:	Lucas Leong (@_wmliang_), Trend Micro Zero Day Initiative
Reviewed by:	imp, mav
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34692
2022-03-28 20:35:47 -04:00
..
mpi mps: clean up empty lines in .c and .h files 2020-09-01 22:07:00 +00:00
mps_config.c mps/mpr: Add missing newlines in error messages. 2022-02-22 15:08:22 -05:00
mps_ioctl.h mps: clean up empty lines in .c and .h files 2020-09-01 22:07:00 +00:00
mps_mapping.c mpr/mps(4): Make device mapping some more robust. 2021-04-23 23:36:51 -04:00
mps_mapping.h mps: clean up empty lines in .c and .h files 2020-09-01 22:07:00 +00:00
mps_pci.c Refine the busdma template interface. Provide tools for filling in fields 2020-09-14 05:58:12 +00:00
mps_sas_lsi.c Fix "set but not used" warnings in the mps driver. 2021-11-25 03:23:02 +00:00
mps_sas.c mpr/mps: Fix a race in diagnostic reset 2022-01-25 19:15:46 -07:00
mps_sas.h mpr/mps: Remove write-only flag and callout 2022-01-24 13:21:09 -07:00
mps_table.c Fix "set but not used" warnings in the mps driver. 2021-11-25 03:23:02 +00:00
mps_table.h
mps_user.c mpr/mps/mpt: verify cfg page ioctl lengths 2022-03-28 20:35:47 -04:00
mps.c mps: Use 64-bit chain structures 2022-02-02 22:35:33 -07:00
mpsvar.h mps: Use 64-bit chain structures 2022-02-02 22:35:33 -07:00