From: Francois Romieu <romieu@fr.zoreil.com>
To: Tong Zhang <ztong0001@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Arnd Bergmann <arnd@arndb.de>, Jason Gunthorpe <jgg@ziepe.ca>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Yilun Wu <yiluwu@cs.stonybrook.edu>
Subject: Re: [PATCH] epic100: fix use after free on rmmod
Date: Thu, 23 Jun 2022 11:22:28 +0200 [thread overview]
Message-ID: <YrQw1CVJfIS18CNo@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <20220623074005.259309-1-ztong0001@gmail.com>
Tong Zhang <ztong0001@gmail.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@cs.stonybrook.edu>
> Signed-off-by: Tong Zhang <ztong0001@gmail.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.
Reviewed-by: Francois Romieu <romieu@fr.zoreil.com>
--
Ueimor
next prev parent reply other threads:[~2022-06-23 9:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-23 7:40 Tong Zhang
2022-06-23 9:22 ` Francois Romieu [this message]
2022-06-24 18:41 ` Jakub Kicinski
2022-06-26 4:45 ` Tong Zhang
2022-06-26 15:07 ` Francois Romieu
2022-06-27 4:35 ` Tong Zhang
2022-06-27 4:33 ` [PATCH v2] " Tong Zhang
2022-06-28 5:00 ` 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=YrQw1CVJfIS18CNo@electric-eye.fr.zoreil.com \
--to=romieu@fr.zoreil.com \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=jgg@ziepe.ca \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=yiluwu@cs.stonybrook.edu \
--cc=ztong0001@gmail.com \
/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®