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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <18afff6f-ce0a-1d98-aeb9-236878692e6b@acm.org>
Date:   Sat, 2 Jul 2022 15:26:33 -0700
From:   Bart Van Assche <bvanassche@....org>
To:     Hillf Danton <hdanton@...a.com>
Cc:     Mike Christie <michael.christie@...cle.com>,
        "lizhijian@...itsu.com" <lizhijian@...itsu.com>,
        Jason Gunthorpe <jgg@...pe.ca>,
        Leon Romanovsky <leon@...nel.org>,
        "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        "target-devel@...r.kernel.org" <target-devel@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: use-after-free in srpt_enable_tpg()

On 6/30/22 18:59, Hillf Danton wrote:
> That hang can be skipped by removing the wait loop in
> srpt_release_sport() - in the direction of 9b64f7d0bb0a, sdev will not
> go home if any sport's refcount does not drop on ground. To do that, add
> port refcount to sdev in the diff below in bid to resurrect 9b64f7d0bb0a.
> 
> Then gc work can be added for dying sports to drop tpg after delaying a second.

I'm afraid that the patch from your email will lead to a use-after-free 
of sdev->pd. As long as a session is live the ch->qp pointer may be 
dereferenced. The sdev->pd pointer is stored in the pd member of struct 
ib_qp and hence may be dereferenced by any function that uses ch->qp.

Thanks,

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ