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: <f1cb1d05-d4da-4a5f-a7b2-0316feda71ff@huawei.com>
Date: Mon, 8 Sep 2025 10:47:10 +0800
From: Pu Lehui <pulehui@...wei.com>
To: Steven Rostedt <rostedt@...dmis.org>
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 2025/9/6 3:39, Steven Rostedt wrote:
> 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..

agree!

> 
>>
>> 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.

Looks like an interesting ops. Will do

> 
> -- Steve
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ