From: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
To: Armin Wolf <W_Armin@gmx.de>
Cc: Shuangpeng Bai <shuangpeng.kernel@gmail.com>,
hansg@kernel.org, ilpo.jarvinen@linux.intel.com,
Dell.Client.Kernel@dell.com, platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Subject: Re: [BUG] KASAN: slab-use-after-free in _copy_to_user from platform/x86/dell-smbios-wmi
Date: Mon, 15 Jun 2026 15:30:07 +0200 [thread overview]
Message-ID: <2026061525-dayroom-backspace-4273@gregkh> (raw)
In-Reply-To: <543e7c0f-ae4b-49e4-8bdf-6bf7d0dc4775@gmx.de>
On Mon, Jun 15, 2026 at 02:19:16PM +0200, Armin Wolf wrote:
> Am 14.06.26 um 21:15 schrieb Shuangpeng Bai:
>
> > Hi Kernel Maintainers,
> >
> > I hit the following report while testing current upstream kernel:
> >
> > KASAN: slab-use-after-free in _copy_to_user from platform/x86/dell-smbios-wmi
> >
> > on commit: e8c2f9fdadee7cbc75134dc463c1e0d856d6e5c7 (May 25 2026)
> >
> > The reproducer and .config files are here.
> > https://gist.github.com/shuangpengbai/f5b15c099e80897486b4238ddb91df79
> >
> > I'm happy to test debug patches or provide additional information.
>
> It seems that unbinding the dell-smbios-wmi driver races with any outstanding
> file operations on the misc device, causing them to access memory already freed
> by the unbound driver.
How can that happen if the module reference count is properly
incremented when the file is open? Perhaps the driver isn't doing that
correctly?
> I do not know if the misc device synchronizes file operations against removal,
> but i do not think that this is the case. I added the maintains of the char drivers
> to the discussion, maybe they know this.
Wait, is this a module unload, or a manual "unbind" operation from
sysfs? Either way, this something that only root does, and is not part
of any normal operation that a user can trigger, or should ever be
doing, so it's kind of "best effort" if it works at all :)
thanks,
greg k-h
next prev parent reply other threads:[~2026-06-15 13:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-14 19:15 Shuangpeng Bai
2026-06-15 12:19 ` Armin Wolf
2026-06-15 13:30 ` gregkh [this message]
2026-06-15 15:28 ` Arnd Bergmann
2026-06-15 20:21 ` Armin Wolf
2026-06-15 21:00 ` Arnd Bergmann
2026-06-15 22:28 ` Armin Wolf
2026-06-16 2:44 ` Greg Kroah-Hartman
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=2026061525-dayroom-backspace-4273@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=Dell.Client.Kernel@dell.com \
--cc=W_Armin@gmx.de \
--cc=arnd@arndb.de \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=shuangpeng.kernel@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
Powered by JetHome