From: Chen Changcheng <ccc194101@163.com>
To: jeffinphilip14@gmail.com
Cc: bentiss@kernel.org, chenchangcheng@kylinos.cn, jikos@kernel.org,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
sashiko-bot@kernel.org, ccc194101@163.com
Subject: Re: [PATCH 0/2] HID: corsair: fix two use-after-free bugs on device removal
Date: Mon, 17 Aug 2026 15:23:54 +0800 [thread overview]
Message-ID: <20260817072354.139154-1-ccc194101@163.com> (raw)
In-Reply-To: <20260815181223.686663-1-jeffinphilip14@gmail.com>
Hi Jeffin,
Thanks for the review and for the pointer to the syzbot report.
You are right: led_classdev_unregister() internally calls
led_set_brightness(LED_OFF), which reaches k90_brightness_set() and
re-schedules the worker after cancel_work_sync() has returned, so the
work_struct can still be queued when kfree() is called. This is the
issue syzbot reported (extid=0a031a76585d1c7e737d).
The follow-up patch below makes k90_brightness_set() a no-op once
removed is set, so the LED_OFF update from led_classdev_unregister()
cannot re-schedule the worker after it has been cancelled. It also
applies the same cancel-before-unregister ordering to the probe error
path in k90_init_macro_functions() for consistency.
Thanks,
Chen Changcheng
next prev parent reply other threads:[~2026-08-17 7:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-24 9:19 [PATCH] HID: corsair: fix use-after-free by reordering remove sequence Chen Changcheng
2026-07-24 9:37 ` sashiko-bot
2026-07-27 1:34 ` [PATCH 0/2] HID: corsair: fix two use-after-free bugs on device removal Chen Changcheng
2026-07-27 1:34 ` [PATCH 1/2] HID: corsair: fix use-after-free by reordering remove sequence Chen Changcheng
2026-07-27 1:46 ` sashiko-bot
2026-07-27 1:35 ` [PATCH 2/2] HID: corsair: cancel worker before unregistering LED to fix use-after-free Chen Changcheng
2026-07-27 1:45 ` sashiko-bot
2026-08-15 18:12 ` [PATCH 0/2] HID: corsair: fix two use-after-free bugs on device removal Jeffin Philip
2026-08-17 7:23 ` Chen Changcheng [this message]
2026-08-17 7:28 ` [PATCH] HID: corsair: do not re-schedule LED worker after it has been cancelled Chen Changcheng
2026-08-17 7:47 ` sashiko-bot
2026-08-03 19:22 ` [PATCH 0/2] HID: corsair: fix two use-after-free bugs on device removal Jiri Kosina
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=20260817072354.139154-1-ccc194101@163.com \
--to=ccc194101@163.com \
--cc=bentiss@kernel.org \
--cc=chenchangcheng@kylinos.cn \
--cc=jeffinphilip14@gmail.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sashiko-bot@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