aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw/rxe/rxe_qp.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2021-06-16 13:26:15 -0700
committerJason Gunthorpe <jgg@nvidia.com>2021-06-22 14:05:34 -0300
commit6d33cabf2baf304730d01a942095416b3a8329ab (patch)
treea01928694aef680f9091fd70987a5063230ece51 /drivers/infiniband/sw/rxe/rxe_qp.c
parentRDMA/rxe: Don't overwrite errno from ib_umem_get() (diff)
downloadlinux-dev-6d33cabf2baf304730d01a942095416b3a8329ab.tar.xz
linux-dev-6d33cabf2baf304730d01a942095416b3a8329ab.zip
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>
Diffstat (limited to 'drivers/infiniband/sw/rxe/rxe_qp.c')
0 files changed, 0 insertions, 0 deletions