mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Juergen Gross <jgross@suse.com>
Cc: cve@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: CVE-2022-49660: xen/arm: Fix race in RB-tree based P2M accounting
Date: Wed, 26 Feb 2025 11:05:55 +0100	[thread overview]
Message-ID: <2025022608-sternum-phoniness-988d@gregkh> (raw)
In-Reply-To: <9a6223ee-cb70-4c20-9749-e5ddc5018f1b@suse.com>

On Wed, Feb 26, 2025 at 08:01:04AM +0100, Juergen Gross wrote:
> On 26.02.25 03:23, Greg Kroah-Hartman wrote:
> > Description
> > ===========
> > 
> > In the Linux kernel, the following vulnerability has been resolved:
> > 
> > xen/arm: Fix race in RB-tree based P2M accounting
> > 
> > During the PV driver life cycle the mappings are added to
> > the RB-tree by set_foreign_p2m_mapping(), which is called from
> > gnttab_map_refs() and are removed by clear_foreign_p2m_mapping()
> > which is called from gnttab_unmap_refs(). As both functions end
> > up calling __set_phys_to_machine_multi() which updates the RB-tree,
> > this function can be called concurrently.
> > 
> > There is already a "p2m_lock" to protect against concurrent accesses,
> > but the problem is that the first read of "phys_to_mach.rb_node"
> > in __set_phys_to_machine_multi() is not covered by it, so this might
> > lead to the incorrect mappings update (removing in our case) in RB-tree.
> > 
> > In my environment the related issue happens rarely and only when
> > PV net backend is running, the xen_add_phys_to_mach_entry() claims
> > that it cannot add new pfn <-> mfn mapping to the tree since it is
> > already exists which results in a failure when mapping foreign pages.
> > 
> > But there might be other bad consequences related to the non-protected
> > root reads such use-after-free, etc.
> > 
> > While at it, also fix the similar usage in __pfn_to_mfn(), so
> > initialize "struct rb_node *n" with the "p2m_lock" held in both
> > functions to avoid possible bad consequences.
> > 
> > This is CVE-2022-33744 / XSA-406.
> 
> As clearly visible in the commit message: there is already a CVE assigned.
> 
> Please revoke CVE-2022-49660.

Ugh, I thought I caught all of these in doing my reviews, sorry about
that.

And any reason why the cve.org record does NOT have this git id in it
for this CVE record?  I check them all before assigning new ids like
this (it was part of the big GSD dump that we are slowly backfilling)
and I use that to prevent duplicate ids from being created.

Also thanks for the review of all of the other xen cves, I'll go revoke
them now as well.

thanks,

greg k-h

      reply	other threads:[~2025-02-26 10:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2025022622-CVE-2022-49660-cf45@gregkh>
2025-02-26  7:01 ` Juergen Gross
2025-02-26 10:05   ` Greg Kroah-Hartman [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=2025022608-sternum-phoniness-988d@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=cve@kernel.org \
    --cc=jgross@suse.com \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®