]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/addr: Be strict with gid size
authorLeon Romanovsky <leonro@nvidia.com>
Mon, 5 Apr 2021 07:44:34 +0000 (10:44 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 8 Apr 2021 19:14:56 +0000 (16:14 -0300)
commitf51ccd9ba05a7b25759c69a95c7f9ac356ee2de8
treee2702fb118821550e708e9cadd2c88161619ba85
parentc4e1ebd7b030cc8248bf6460c4d6e03720ace493
RDMA/addr: Be strict with gid size

The nla_len() is less than or equal to 16.  If it's less than 16 then end
of the "gid" buffer is uninitialized.

Fixes: 828d03f26f4a ("IB/core: Add IP to GID netlink offload")
Link: https://lore.kernel.org/r/20210405074434.264221-1-leon@kernel.org
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/core/addr.c