lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <75d23c63-8ea7-7d76-2b1e-a641e1907e15@grimberg.me>
Date:	Tue, 16 Aug 2016 16:17:41 +0300
From:	Sagi Grimberg <sagi@...mberg.me>
To:	Vincent Stehlé <vincent.stehle@...el.com>,
	linux-nvme@...ts.infradead.org, linux-rdma@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, Christoph Hellwig <hch@....de>
Subject: Re: [PATCH] nvmet-rdma: Fix use after free

> Avoid dereferencing the queue pointer in nvmet_rdma_release_queue_work()
> after it has been freed by nvmet_rdma_free_queue().
>
> Fixes: d8f7750a08968b10 ("nvmet-rdma: Correctly handle RDMA device hot removal")
> Signed-off-by: Vincent Stehlé <vincent.stehle@...el.com>
> Cc: Sagi Grimberg <sagi@...mberg.me>
> Cc: Christoph Hellwig <hch@....de>
> ---
>  drivers/nvme/target/rdma.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/target/rdma.c b/drivers/nvme/target/rdma.c
> index b4d6485..5de8d0a 100644
> --- a/drivers/nvme/target/rdma.c
> +++ b/drivers/nvme/target/rdma.c
> @@ -978,10 +978,11 @@ static void nvmet_rdma_release_queue_work(struct work_struct *w)
>  		container_of(w, struct nvmet_rdma_queue, release_work);
>  	struct rdma_cm_id *cm_id = queue->cm_id;
>  	struct nvmet_rdma_device *dev = queue->dev;
> +	enum nvmet_rdma_queue_state state = queue->state;
>
>  	nvmet_rdma_free_queue(queue);
>
> -	if (queue->state != NVMET_RDMA_IN_DEVICE_REMOVAL)
> +	if (state != NVMET_RDMA_IN_DEVICE_REMOVAL)
>  		rdma_destroy_id(cm_id);
>
>  	kref_put(&dev->ref, nvmet_rdma_free_dev);
>

Queued for the next round of rc fixes.

Thanks Vincent!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ