[Linux-kernel-mentees] [PATCH v2] infiniband: Prevent uninit-value in ucma_accept()

Jason Gunthorpe jgg at ziepe.ca
Mon Jul 27 14:58:56 UTC 2020


On Sat, Jul 25, 2020 at 10:27:16PM -0400, Peilin Ye wrote:
> ucma_accept() is reading uninitialized memory when `in_len` is
> less than `offsetof(struct rdma_ucm_accept, ece)`. Fix it.
> 
> Reported-and-tested-by: syzbot+086ab5ca9eafd2379aa6 at syzkaller.appspotmail.com
> Link: https://syzkaller.appspot.com/bug?id=0bce3bb68cb383fce92f78444e3ef77c764b60ad
> Signed-off-by: Peilin Ye <yepeilin.cs at gmail.com>
> ---
> Change in v2:
>     - syzbot has reported this bug as "KMSAN: uninit-value in xa_load".
>       Add "Reported-and-tested-by:" and "Link:" tags for it.
> 
>  drivers/infiniband/core/ucma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Already fixed:

https://lore.kernel.org/r/0-v1-d5b86dab17dc+28c25-ucma_syz_min_jgg@nvidia.com

Jason


More information about the Linux-kernel-mentees mailing list