[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Fri, 3 Mar 2023 15:06:41 +0100 (CET)
From: Jiri Kosina <jikos@...nel.org>
To: Reka Norman <rekanorman@...omium.org>
cc: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
Benjamin Tissoires <benjamin.tissoires@...hat.com>,
Li Qiong <liqiong@...china.com>, linux-input@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] HID: intel-ish-hid: ipc: Fix potential use-after-free
in work function
On Mon, 27 Feb 2023, Reka Norman wrote:
> When a reset notify IPC message is received, the ISR schedules a work
> function and passes the ISHTP device to it via a global pointer
> ishtp_dev. If ish_probe() fails, the devm-managed device resources
> including ishtp_dev are freed, but the work is not cancelled, causing a
> use-after-free when the work function tries to access ishtp_dev. Use
> devm_work_autocancel() instead, so that the work is automatically
> cancelled if probe fails.
>
> Signed-off-by: Reka Norman <rekanorman@...omium.org>
Applied, thank you.
--
Jiri Kosina
SUSE Labs
Powered by blists - more mailing lists