lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2025010920-eclair-battery-fa8d@gregkh>
Date: Thu, 9 Jan 2025 11:04:27 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: Koichiro Den <koichiro.den@...onical.com>
Cc: stable@...r.kernel.org, rostedt@...dmis.org, mhiramat@...nel.org,
	mark.rutland@....com, mathieu.desnoyers@...icios.com,
	zhengyejian1@...wei.com, hagarhem@...zon.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5.4] ftrace: use preempt_enable/disable notrace macros to
 avoid double fault

On Wed, Jan 08, 2025 at 12:17:36PM +0900, Koichiro Den wrote:
> Since the backport commit eea46baf1451 ("ftrace: Fix possible
> use-after-free issue in ftrace_location()") on linux-5.4.y branch, the
> old ftrace_int3_handler()->ftrace_location() path has included
> rcu_read_lock(), which has mcount location inside and leads to potential
> double fault.
> 
> Replace rcu_read_lock/unlock with preempt_enable/disable notrace macros
> so that the mcount location does not appear on the int3 handler path.
> 
> This fix is specific to linux-5.4.y branch, the only branch still using
> ftrace_int3_handler with commit e60b613df8b6 ("ftrace: Fix possible
> use-after-free issue in ftrace_location()") backported. It also avoids
> the need to backport the code conversion to text_poke() on this branch.
> 
> Reported-by: Koichiro Den <koichiro.den@...onical.com>
> Closes: https://lore.kernel.org/all/74gjhwxupvozwop7ndhrh7t5qeckomt7yqvkkbm5j2tlx6dkfk@rgv7sijvry2k
> Fixes: eea46baf1451 ("ftrace: Fix possible use-after-free issue in ftrace_location()") # linux-5.4.y
> Signed-off-by: Steven Rostedt (Google) <rostedt@...dmis.org>
> Signed-off-by: Koichiro Den <koichiro.den@...onical.com>
> ---
>  kernel/trace/ftrace.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Thanks, now queued up.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ