Linux-sh Archive mirror
 help / color / mirror / Atom feed
From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
To: Chen Ridong <chenridong@huaweicloud.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>
Cc: ysato@users.sourceforge.jp, dalias@libc.org,
	gregkh@linuxfoundation.org, ricardo@marliere.net,
	damm@opensource.se, lethal@linux-sh.org,
	 linux-sh@vger.kernel.org, chenridong@huawei.com,
	wangweiyang2@huawei.com
Subject: Re: [PATCH] sh: intc: Fix possible UAF in register_intc_controller
Date: Mon, 25 Nov 2024 08:13:56 +0100	[thread overview]
Message-ID: <b5acd30ef15d409689c06e76ef6e7fb9232a622b.camel@physik.fu-berlin.de> (raw)
In-Reply-To: <a3decec2-53f7-48bd-a2c8-2400cc7a1dad@huaweicloud.com>

Hello Ridong,

On Mon, 2024-11-25 at 09:21 +0800, Chen Ridong wrote:
> On 2024/11/13 16:26, Geert Uytterhoeven wrote:
> > On Wed, Oct 30, 2024 at 7:17 AM Chen Ridong <chenridong@huaweicloud.com> wrote:
> > > From: Chen Ridong <chenridong@huawei.com>
> > > 
> > > When it goes to error, the 'd' is freed, but 'd->list' was not deleted
> > > from 'intc_list', which may lead to a UAF.
> > > 
> > > Fixes: 01e9651a21bc ("sh: add INTC out of memory error handling")
> > > Signed-off-by: Chen Ridong <chenridong@huawei.com>
> > 
> > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > 
> > Gr{oetje,eeting}s,
> > 
> >                         Geert
> > 
> 
> Hi, can this patch be applied?

The patch is on my list, don't worry.

However, the same issue was actually already fixed by Dan Carpenter:

> https://patchwork.kernel.org/project/linux-sh/patch/45ff88d1-b687-43f4-a022-4e07930cd2d0@stanley.mountain/

I need to figure out which of the two is the better approach.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

      reply	other threads:[~2024-11-25  7:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-30  6:08 [PATCH] sh: intc: Fix possible UAF in register_intc_controller Chen Ridong
2024-11-07  0:57 ` Chen Ridong
2024-11-07  7:35   ` John Paul Adrian Glaubitz
2024-11-07  7:57     ` Chen Ridong
2024-11-13  6:21     ` Chen Ridong
2024-11-13  8:35       ` John Paul Adrian Glaubitz
2024-11-14  3:02         ` Chen Ridong
2024-11-13  8:26 ` Geert Uytterhoeven
2024-11-25  1:21   ` Chen Ridong
2024-11-25  7:13     ` John Paul Adrian Glaubitz [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=b5acd30ef15d409689c06e76ef6e7fb9232a622b.camel@physik.fu-berlin.de \
    --to=glaubitz@physik.fu-berlin.de \
    --cc=chenridong@huawei.com \
    --cc=chenridong@huaweicloud.com \
    --cc=dalias@libc.org \
    --cc=damm@opensource.se \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=lethal@linux-sh.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=ricardo@marliere.net \
    --cc=wangweiyang2@huawei.com \
    --cc=ysato@users.sourceforge.jp \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).