[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f5b8a4e5-069b-290d-b0d6-2ef89f7a0d4a@mleia.com>
Date: Wed, 12 May 2021 20:04:27 +0300
From: Vladimir Zapolskiy <vz@...ia.com>
To: Zou Wei <zou_wei@...wei.com>, wim@...ux-watchdog.org,
linux@...ck-us.net
Cc: linux-watchdog@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] watchdog: Fix possible use-after-free by calling
del_timer_sync()
On 5/12/21 9:57 AM, Zou Wei wrote:
> This driver's remove path calls del_timer(). However, that function
> does not wait until the timer handler finishes. This means that the
> timer handler may still be running after the driver's remove function
> has finished, which would result in a use-after-free.
>
> Fix by calling del_timer_sync(), which makes sure the timer handler
> has finished, and unable to re-schedule itself.
>
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Zou Wei <zou_wei@...wei.com>
Acked-by: Vladimir Zapolskiy <vz@...ia.com>
--
Best wishes,
Vladimir
Powered by blists - more mailing lists