linux/include/uapi
Kees Cook 6d33cabf2b RDMA/core: Use flexible array for mad data
In preparation for FORTIFY_SOURCE performing compile-time and run-time
field bounds checking for memcpy(), memmove(), and memset(), avoid
intentionally reading across neighboring array fields.

Without a flexible array, this looks like an attempt to perform a memcpy()
read beyond the end of the packet->mad.data array:

drivers/infiniband/core/user_mad.c:
	memcpy(packet->msg->mad, packet->mad.data, IB_MGMT_MAD_HDR);

Switch from [0] to [] to use the appropriately handled type for trailing
bytes.

Link: https://lore.kernel.org/r/20210616202615.1247242-1-keescook@chromium.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2021-06-22 14:05:34 -03:00
..
asm-generic Add Landlock, a new LSM from Mickaël Salaün <mic@linux.microsoft.com> 2021-05-01 18:50:44 -07:00
drm Merge tag 'drm-msm-next-2021-04-11' of https://gitlab.freedesktop.org/drm/msm into drm-next 2021-04-13 23:35:54 +02:00
linux Networking fixes for 5.13-rc1, including fixes from bpf, can 2021-05-08 08:31:46 -07:00
misc Char/Misc driver updates for 5.13-rc1 2021-04-26 11:03:17 -07:00
mtd mtd: add OTP (one-time-programmable) erase ioctl 2021-03-28 19:24:54 +02:00
rdma RDMA/core: Use flexible array for mad data 2021-06-22 14:05:34 -03:00
scsi
sound
video
xen
Kbuild