Re: [PATCH] sh: intc: Fix possible UAF in register_intc_controller

John Paul Adrian Glaubitz <[email protected]>
Newsgroups gmane.linux.ports.sh.devel
Message-ID <b5acd30ef15d409689c06e76ef6e7fb9232a622b.camel@physik.fu-berlin.de>
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 <[email protected]> wrote:
> > > From: Chen Ridong <[email protected]>
> > > 
> > > 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 <[email protected]>
> > 
> > Reviewed-by: Geert Uytterhoeven <[email protected]>
> > 
> > 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/[email protected]/

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.