From: Mykyta Yatsenko <mykyta.yatsenko5@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, mhiramat@kernel.org, andrii@kernel.org,
kernel-team@meta.com, linux-kernel@vger.kernel.org,
Mykyta Yatsenko <yatsenko@meta.com>,
Kees Cook <keescook@chromium.org>
Subject: Re: [PATCH v2] maccess: fix strncpy_from_user_nofault empty string handling
Date: Wed, 23 Apr 2025 15:48:52 +0100 [thread overview]
Message-ID: <ccfc1eeb-8bd1-41f9-9146-c8752723ccad@gmail.com> (raw)
In-Reply-To: <20250423095941.1cab813f@gandalf.local.home>
On 4/23/25 14:59, Steven Rostedt wrote:
> On Wed, 23 Apr 2025 12:37:46 +0100
> Mykyta Yatsenko <mykyta.yatsenko5@gmail.com> wrote:
>
>>> Does this fix any known runtime issue? If so, please fully describe this?
>> Not that I'm aware of. The issue could be found when trying to copy empty
>> user space string in BPF program (and relying on return value).There are
>> some usage of
>> `strncpy_from_user_nofault` in tracing subsystem, but I'm not sure how to
>> hit those code paths.
>>>
> Although your patch found a bug in the tracing subsystem, this wasn't the
> cause. It only cared if the read faulted or not. It was incorrectly
> checking for zero as non fault when in reality, it needed to check >= 0.
>
> With that fixed, it should work the same with or without this patch.
>
> -- Steve
Sure, I had in mind usages from trace_probe_kernel.h,
namely fetch_store_string_user, fetch_store_string, having a second look,
it appears these only used in trace_events_synth.c, and we are good there.
prev parent reply other threads:[~2025-04-23 14:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-22 13:14 Mykyta Yatsenko
2025-04-22 15:48 ` Andrii Nakryiko
2025-04-23 0:20 ` Andrew Morton
2025-04-23 11:37 ` Mykyta Yatsenko
2025-04-23 13:59 ` Steven Rostedt
2025-04-23 14:48 ` Mykyta Yatsenko [this message]
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=ccfc1eeb-8bd1-41f9-9146-c8752723ccad@gmail.com \
--to=mykyta.yatsenko5@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andrii@kernel.org \
--cc=keescook@chromium.org \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
--cc=yatsenko@meta.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox