All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: dennis.dalessandro@cornelisnetworks.com
Cc: dledford@redhat.com, linux-rdma@vger.kernel.org,
	Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH for-rc 4/4] IB/hfi1: Fix regressions in security fix
Date: Tue, 13 Apr 2021 19:55:09 -0300	[thread overview]
Message-ID: <20210413225509.GA1376467@nvidia.com> (raw)
In-Reply-To: <1617025700-31865-5-git-send-email-dennis.dalessandro@cornelisnetworks.com>

On Mon, Mar 29, 2021 at 09:48:20AM -0400, dennis.dalessandro@cornelisnetworks.com wrote:
> From: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
> 
> The security code guards for non-current mm in all cases for
> updating the rb tree.
> 
> That is ok for insert, but NOT ok for remove, since the insert
> has already guarded the node from being inserted and the remove
> can be called with a different mm because of a segfault other similar
> "close" issues where current-mm is NULL.
> 
> Best case, is we leak pages. worst case we delete items for an lru_list
> more than once:
> [20945.911107] list_del corruption, ffffa0cd536bcac8->next is LIST_POISON1 (dead000000000100)
> 
> Fix by removing the guard from any functions that remove nodes
> from the tree assuming the node was entered into the tree as valid since
> the insert is guarded.
> 
> Fixes: 3d2a9d642512 ("IB/hfi1: Ensure correct mm is used at all times")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
>  drivers/infiniband/hw/hfi1/mmu_rb.c | 9 ---------
>  1 file changed, 9 deletions(-)

I'm going to drop this - resend it when the more thinking is done

But generally the security concern is establishing new access to a mm,
not so much destroying access created by another user of a FD.

Jason

      parent reply	other threads:[~2021-04-13 22:55 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-29 13:48 [PATCH for-rc 0/4] hfi fixes dennis.dalessandro
2021-03-29 13:48 ` [PATCH for-rc 1/4] IB/hfi1: Call xa_destroy before freeing dummy_netdev dennis.dalessandro
2021-03-29 14:09   ` Jason Gunthorpe
2021-03-31 19:36     ` Dennis Dalessandro
2021-04-01  6:06       ` Greg KH
2021-04-01 14:02         ` Dennis Dalessandro
2021-04-01 14:12           ` Greg KH
2021-04-01 15:00             ` Dennis Dalessandro
2021-04-01 12:33       ` Jason Gunthorpe
2021-04-01 13:42         ` Wan, Kaike
2021-04-01 13:48           ` Jason Gunthorpe
2021-03-29 13:48 ` [PATCH for-rc 2/4] IB/hfi1: Call xa_destroy before unloading the module dennis.dalessandro
2021-03-29 14:11   ` Jason Gunthorpe
2021-04-08 13:30     ` Dennis Dalessandro
2021-03-29 13:48 ` [PATCH for-rc 3/4] IB/hfi1: Fix probe time panic when AIP is enabled with a buggy BIOS dennis.dalessandro
2021-04-07 23:04   ` Jason Gunthorpe
2021-03-29 13:48 ` [PATCH for-rc 4/4] IB/hfi1: Fix regressions in security fix dennis.dalessandro
2021-03-29 18:36   ` Ira Weiny
2021-04-07 18:33     ` Jason Gunthorpe
2021-04-07 20:20       ` Dennis Dalessandro
2021-04-13 22:55   ` Jason Gunthorpe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210413225509.GA1376467@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=dennis.dalessandro@cornelisnetworks.com \
    --cc=dledford@redhat.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mike.marciniszyn@cornelisnetworks.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.