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] [day] [month] [year] [list]
Message-ID: <20250905153926.68b47107@gandalf.local.home>
Date: Fri, 5 Sep 2025 15:39:26 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Pu Lehui <pulehui@...wei.com>
Cc: <mhiramat@...nel.org>, <mathieu.desnoyers@...icios.com>, Pu Lehui
 <pulehui@...weicloud.com>, <linux-kernel@...r.kernel.org>,
 <linux-trace-kernel@...r.kernel.org>
Subject: Re: [PATCH] tracing: Fix missing errno when zero parser->idx in
 trace_pid_write

On Wed, 3 Sep 2025 12:15:16 +0800
Pu Lehui <pulehui@...wei.com> wrote:

> As for this fault injection syzkaller issue, shall we need to silence 
> it? How about the below fix?

I usually don't care about fault injections because it causes "faults" that
would only happen if the system was about to crash. But anyway..

> 
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index e6b50b416e63..c17c031e7917 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -834,7 +834,11 @@ int trace_pid_write(struct trace_pid_list 
> *filtered_pids,
>                  /* copy the current bits to the new max */
>                  ret = trace_pid_list_first(filtered_pids, &pid);
>                  while (!ret) {
> -                       trace_pid_list_set(pid_list, pid);
> +                       ret = trace_pid_list_set(pid_list, pid);
> +                       if (ret) {
> +                               trace_parser_put(&parser);
> +                               return ret;
> +                       }

make it:

			if (ret < 0)
				goto out;

>                          ret = trace_pid_list_next(filtered_pids, pid + 
> 1, &pid);
>                          nr_pids++;
>                  }

And put the out label just before the trace_parser_put().

Oh, and add one space before the "out:" label. That makes diffs of patches
show the function when changes are after the label and not the label itself.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ