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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 13 Dec 2023 08:01:27 -0500
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Zheng Yejian <zhengyejian1@...wei.com>
Cc:     <linux-kernel@...r.kernel.org>,
        <linux-trace-kernel@...r.kernel.org>,
        <mathieu.desnoyers@...icios.com>, <mhiramat@...nel.org>,
        <yeweihua4@...wei.com>
Subject: Re: [PATCH v2] tracing: Fix uaf issue when open the hist or
 hist_debug file

On Wed, 13 Dec 2023 09:51:38 +0800
Zheng Yejian <zhengyejian1@...wei.com> wrote:

> ---
>  kernel/trace/trace_events_hist.c | 18 ++++++++++++++----
>  1 file changed, 14 insertions(+), 4 deletions(-)
> 
> Steve, thanks for your review!
> 
> v2:
>   - Introduce tracing_single_release_file_tr() to add the missing call for
>     single_release() as suggested by Steve;
>     Link: https://lore.kernel.org/all/20231212113546.6a51d359@gandalf.local.home/
>   - Slightly modify the commit message and comments.
> 
> v1:
>   Link: https://lore.kernel.org/all/20231212113317.4159890-1-zhengyejian1@huawei.com/
> 
> diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
> index 1abc07fba1b9..5296a08c0641 100644
> --- a/kernel/trace/trace_events_hist.c
> +++ b/kernel/trace/trace_events_hist.c
> @@ -5619,14 +5619,22 @@ static int hist_show(struct seq_file *m, void *v)
>  	return ret;
>  }
>  
> +static int tracing_single_release_file_tr(struct inode *inode, struct file *filp)
> +{
> +	tracing_release_file_tr(inode, filp);
> +	return single_release(inode, filp);
> +}
> +

Hi Zheng,

Could you put the tracing_single_release_file_tr() into trace.c as a non
static function. Put the protocol in kernel/trace/trace.h.

Even though it's only used in trace_events_hist.c, I rather not hide it
there. If this issue appears for another file, I would look in trace.c and
trace.h for available functions to use.

Thanks,

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ