From: Greg KH <gregkh@linuxfoundation.org>
To: He Zhe <zhe.he@windriver.com>
Cc: stable@vger.kernel.org
Subject: Re: [PATCH 5.10] watchdog: cpu5wdt.c: Fix use-after-free bug caused by cpu5wdt_trigger
Date: Fri, 18 Oct 2024 16:26:50 +0200 [thread overview]
Message-ID: <2024101821-pruning-estrogen-c92d@gregkh> (raw)
In-Reply-To: <20241018135428.1422904-5-zhe.he@windriver.com>
On Fri, Oct 18, 2024 at 09:54:28PM +0800, He Zhe wrote:
> From: Duoming Zhou <duoming@zju.edu.cn>
>
> commit 573601521277119f2e2ba5f28ae6e87fc594f4d4 upstream.
>
> When the cpu5wdt module is removing, the origin code uses del_timer() to
> de-activate the timer. If the timer handler is running, del_timer() could
> not stop it and will return directly. If the port region is released by
> release_region() and then the timer handler cpu5wdt_trigger() calls outb()
> to write into the region that is released, the use-after-free bug will
> happen.
>
> Change del_timer() to timer_shutdown_sync() in order that the timer handler
> could be finished before the port region is released.
>
> Fixes: e09d9c3e9f85 ("watchdog: cpu5wdt.c: add missing del_timer call")
> Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> Link: https://lore.kernel.org/r/20240324140444.119584-1-duoming@zju.edu.cn
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
>
> CVE: CVE-2024-38630
>
> [Zhe: The function timer_shutdown_sync in the original fix is not
> introduced to 5.10 yet. As stated in f571faf6e443b6011ccb585d57866177af1f643c
Please refer to commits in the correct way, this would be f571faf6e443
("timers: Provide timer_shutdown[_sync]()"), right?
thanks,
greg k-h
next prev parent reply other threads:[~2024-10-18 14:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-18 13:54 [PATCH 5.10] gfs2: Fix potential glock use-after-free on unmount He Zhe
2024-10-18 13:54 ` [PATCH 5.10] rcu-tasks: Fix show_rcu_tasks_trace_gp_kthread buffer overflow He Zhe
2024-10-18 14:28 ` Greg KH
2024-10-18 13:54 ` [PATCH 5.10] ftrace: Fix possible use-after-free issue in ftrace_location() He Zhe
2024-10-18 14:27 ` Greg KH
2024-10-18 13:54 ` [PATCH 5.10] drm/amdkfd: don't allow mapping the MMIO HDP page with large pages He Zhe
2024-10-18 14:27 ` Greg KH
2024-10-18 13:54 ` [PATCH 5.10] watchdog: cpu5wdt.c: Fix use-after-free bug caused by cpu5wdt_trigger He Zhe
2024-10-18 14:26 ` Greg KH [this message]
2024-10-18 14:26 ` [PATCH 5.10] gfs2: Fix potential glock use-after-free on unmount Greg KH
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=2024101821-pruning-estrogen-c92d@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=stable@vger.kernel.org \
--cc=zhe.he@windriver.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.