]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/ucma: Fix use-after-free access in ucma_close
authorLeon Romanovsky <leonro@mellanox.com>
Mon, 19 Mar 2018 12:20:15 +0000 (14:20 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 19 Mar 2018 20:01:35 +0000 (14:01 -0600)
commit1ef3e5b7cf7d295a4b899b81d3bb3898c09146b5
tree65a163114b83699744dcbd7f299afbe1c6ca28e3
parentfb29389aedf0d236e0ba7b4372c50df69b212952
RDMA/ucma: Fix use-after-free access in ucma_close

The error in ucma_create_id() left ctx in the list of contexts belong
to ucma file descriptor. The attempt to close this file descriptor causes
to use-after-free accesses while iterating over such list.

Fixes: b8f533e6bd74 ("RDMA/cma: Export rdma cm interface to userspace")
Reported-by: <syzbot+dcfd344365a56fbebd0f@syzkaller.appspotmail.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/ucma.c