[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <nycvar.YFH.7.76.2302201009430.1142@cbobk.fhfr.pm>
Date: Mon, 20 Feb 2023 10:09:59 +0100 (CET)
From: Jiri Kosina <jikos@...nel.org>
To: Benjamin Tissoires <benjamin.tissoires@...hat.com>
cc: Rishi Gupta <gupt21@...il.com>,
Pietro Borrello <borrello@...g.uniroma1.it>,
linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] HID: mcp-2221: prevent UAF in delayed work
On Thu, 16 Feb 2023, Benjamin Tissoires wrote:
> If the device is plugged/unplugged without giving time for mcp_init_work()
> to complete, we might kick in the devm free code path and thus have
> unavailable struct mcp_2221 while in delayed work.
>
> Canceling the delayed_work item is enough to solve the issue, because
> cancel_delayed_work_sync will prevent the work item to requeue itself.
>
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@...hat.com>
Acked-by: Jiri Kosina <jkosina@...e.cz>
Thanks Benjamin.
--
Jiri Kosina
SUSE Labs
Powered by blists - more mailing lists