[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201201111943.626cb86f.cohuck@redhat.com>
Date: Tue, 1 Dec 2020 11:19:43 +0100
From: Cornelia Huck <cohuck@...hat.com>
To: Qinglang Miao <miaoqinglang@...wei.com>
Cc: Vineeth Vijayan <vneethv@...ux.ibm.com>,
Peter Oberparleiter <oberpar@...ux.ibm.com>,
"Heiko Carstens" <hca@...ux.ibm.com>,
Vasily Gorbik <gor@...ux.ibm.com>,
"Christian Borntraeger" <borntraeger@...ibm.com>,
<linux-s390@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] s390: cio: fix use-after-free in
ccw_device_destroy_console
On Tue, 1 Dec 2020 14:31:50 +0800
Qinglang Miao <miaoqinglang@...wei.com> wrote:
> put_device calls release function which do kfree() inside.
> So following use of sch&cdev would cause use-after-free bugs.
>
> Fix these by simply adjusting the position of put_device.
>
> Fixes: 37db8985b211 ("s390/cio: add basic protected virtualization support")
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Suggested-by: Cornelia Huck <cohuck@...hat.com>
> Signed-off-by: Qinglang Miao <miaoqinglang@...wei.com>
> ---
> This patch is indeed a v2 of older one. Considering that the
> patch's name has changed, I think a normal prefix 'PATCH' is
> better.
>
> drivers/s390/cio/device.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Cornelia Huck <cohuck@...hat.com>
Powered by blists - more mailing lists