netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Ben Hutchings <ben@decadent.org.uk>, netdev@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org, Eli Cohen <elic@nvidia.com>,
	jacob.e.keller@intel.com, saeedm@nvidia.com
Subject: Re: [PATCH net] lib: cpu_rmap: Fix potential use-after-free in irq_cpu_rmap_release()
Date: Tue, 06 Jun 2023 12:59:17 +0200	[thread overview]
Message-ID: <bedca9be6c496bbe9e124eda7ce13cf15bf7ca54.camel@redhat.com> (raw)
In-Reply-To: <ZHo0vwquhOy3FaXc@decadent.org.uk>

Hi,

On Fri, 2023-06-02 at 20:28 +0200, Ben Hutchings wrote:
> irq_cpu_rmap_release() calls cpu_rmap_put(), which may free the rmap.
> So we need to clear the pointer to our glue structure in rmap before
> doing that, not after.
> 
> Fixes: 4e0473f1060a ("lib: cpu_rmap: Avoid use after free on rmap->obj ...")
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

The patch LGTM, but please include the full blamed commit title into
the fixes tag. A new version will be needed.

Also add Jacob and Saeed to the cc-list

Thanks,

Paolo


  parent reply	other threads:[~2023-06-06 11:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-02 18:28 [PATCH net] lib: cpu_rmap: Fix potential use-after-free in irq_cpu_rmap_release() Ben Hutchings
2023-06-06  8:18 ` Simon Horman
2023-06-06 10:59 ` Paolo Abeni [this message]
2023-06-08  4:30 ` patchwork-bot+netdevbpf

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=bedca9be6c496bbe9e124eda7ce13cf15bf7ca54.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=ben@decadent.org.uk \
    --cc=elic@nvidia.com \
    --cc=jacob.e.keller@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@nvidia.com \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).