[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAA5qM4Aq_2HSxCgaHUgZX9C3E0OCPT4tN-61-MZP1iLXCbF-=Q@mail.gmail.com>
Date: Sat, 25 Jun 2022 21:45:00 -0700
From: Tong Zhang <ztong0001@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Francois Romieu <romieu@...zoreil.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>,
Florian Fainelli <f.fainelli@...il.com>,
Arnd Bergmann <arnd@...db.de>, Jason Gunthorpe <jgg@...pe.ca>,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
Netdev <netdev@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>,
Yilun Wu <yiluwu@...stonybrook.edu>
Subject: Re: [PATCH] epic100: fix use after free on rmmod
On Fri, Jun 24, 2022 at 11:41 AM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Thu, 23 Jun 2022 11:22:28 +0200 Francois Romieu wrote:
> > Tong Zhang <ztong0001@...il.com> :
> > > epic_close() calls epic_rx() and uses dma buffer, but in epic_remove_one()
> > > we already freed the dma buffer. To fix this issue, reorder function calls
> > > like in the .probe function.
> > >
> > > BUG: KASAN: use-after-free in epic_rx+0xa6/0x7e0 [epic100]
> > > Call Trace:
> > > epic_rx+0xa6/0x7e0 [epic100]
> > > epic_close+0xec/0x2f0 [epic100]
> > > unregister_netdev+0x18/0x20
> > > epic_remove_one+0xaa/0xf0 [epic100]
> > >
> > > Fixes: ae150435b59e ("smsc: Move the SMC (SMSC) drivers")
> > > Reported-by: Yilun Wu <yiluwu@...stonybrook.edu>
> > > Signed-off-by: Tong Zhang <ztong0001@...il.com>
> >
> > The "Fixes:" tag is a bit misleading: this code path predates the move
> > by several years. Ignoring pci_* vs dma_* API changes, this is pre-2005
> > material.
>
> Yeah, please find the correct Fixes tag.
>
> > Reviewed-by: Francois Romieu <romieu@...zoreil.com>
>
> Keep Francois' tag when reposting.
Looks like drivers/net/ethernet/smsc/epic100.c is renamed from
drivers/net/epic100.c
and this bug has been around since the very initial commit. What would
you suggest ?
Remove the fix tag or use
Fix: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Powered by blists - more mailing lists