From: Sean Young <sean@mess.org>
To: CJ Liu <firefly0158@163.com>
Cc: mchehab@kernel.org, linux-media@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [BUG] media: rc: redrat3: KASAN use-after-free in rc_dev_uevent after probe failure
Date: Tue, 1 Sep 2026 12:00:23 +0100 [thread overview]
Message-ID: <apawR3dRUYSGrTqp@extorris.mess.org> (raw)
In-Reply-To: <7dbdc4e8.8c60.1a05c579a17.Coremail.firefly0158@163.com>
On Tue, Sep 01, 2026 at 05:40:40PM +0800, CJ Liu wrote:
>
>
> Hi,
>
> I am reporting a KASAN slab-use-after-free triggered by a syzkaller USB
> reproducer on Linux 7.2. The issue is reproducible with HEAD commit
> 45c13f3f9e3bb15fd89ff2864c6f627a3b4b4229.
>
> The reproducer connects a crafted USB device that is bound to the RedRat3
> infrared receiver driver. During probe, the device reports invalid endpoint
> properties and then fails several hardware communication steps. The driver
> eventually fails probe with -EIO.
>
> After the failed probe, systemd-journal reads the device uevent file. This
> reaches rc_dev_uevent(), then add_uevent_var(), vsnprintf(), and string().
> KASAN reports a slab-use-after-free while string() reads a pointer that was
> allocated and freed in redrat3_dev_probe().
>
> This looks like a lifetime issue in the RedRat3 probe failure path. The
> driver appears to free an object or string while it can still be referenced
> from the rc/input/device uevent path. A failed probe should make sure that
> no sysfs/uevent-visible field points to memory that has already been freed.
I am fairly sure this issue is fixed by this commit:
https://gitlab.freedesktop.org/linux-media/media-committers/-/commit/af452b9e01331b5338a1e5141624f17607239207
It was only merged a few hours ago.
Thank you for reporting.
Sean
prev parent reply other threads:[~2026-09-01 11:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 9:40 [BUG] media: rc: redrat3: KASAN use-after-free in rc_dev_uevent after probe failure CJ Liu
2026-09-01 11:00 ` Sean Young [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=apawR3dRUYSGrTqp@extorris.mess.org \
--to=sean@mess.org \
--cc=firefly0158@163.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
/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