Thread (7 messages) flat view 7 messages, 5 authors, 2021-11-25

Re: [PATCH] RDMA: fix use-after-free in rxe_queue_cleanup

From: Jason Gunthorpe <jgg@nvidia.com>
Date: 2021-11-25 17:28:01
Also in: lkml

On Sun, Nov 21, 2021 at 11:22:39PM +0300, Pavel Skripkin wrote:
On error handling path in rxe_qp_from_init() qp->sq.queue is freed and
then rxe_create_qp() will drop last reference to this object. qp clean
up function will try to free this queue one time and it causes UAF bug.

Fix it by zeroing queue pointer after freeing queue in
rxe_qp_from_init().

Fixes: 514aee660df4 ("RDMA: Globally allocate and release QP memory")
Reported-by: syzbot+aab53008a5adf26abe91@syzkaller.appspotmail.com
Signed-off-by: Pavel Skripkin <redacted>
Reviewed-by: Zhu Yanjun <zyjzyj2000@gmail.com>
---
 drivers/infiniband/sw/rxe/rxe_qp.c | 1 +
 1 file changed, 1 insertion(+)
Applied to for-next, thanks

Jason
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help