From: David Vernet <void@manifault.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Linux Trace Devel <linux-trace-devel@vger.kernel.org>,
kernel-team@meta.com, julia.lawall@inria.fr,
himadrispandya@gmail.com,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Subject: Re: [PATCH] trace-cmd record: Use copy of PATH for strtok_r() operations
Date: Tue, 28 Nov 2023 14:33:13 -0600 [thread overview]
Message-ID: <20231128203313.GC431764@maniforge> (raw)
In-Reply-To: <20231128153024.6e0d40e1@gandalf.local.home>
On Tue, Nov 28, 2023 at 03:30:24PM -0500, Steven Rostedt wrote:
> From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
>
> As strtok_r() modifies the string it is parsing, using the environment variable
> PATH to find the paths for execution causes it to be truncated when reused by
> exec. Instead, make a copy of the PATH environment variable to use to parse the
> paths.
>
> I had this fixed in my repo for some time and never pushed it out, but it was
> eventually reported by others.
>
> Link: https://lore.kernel.org/all/20231128192435.36507-1-void@manifault.com/
>
> Reported-by: David Vernet <void@manifault.com>
> Fixes: edf9424029cc ("trace-cmd: Open code execvp routine to avoid multiple execve syscalls")
> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Reviewed-by: David Vernet <void@manifault.com>
prev parent reply other threads:[~2023-11-28 20:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-28 20:30 [PATCH] trace-cmd record: Use copy of PATH for strtok_r() operations Steven Rostedt
2023-11-28 20:33 ` David Vernet [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=20231128203313.GC431764@maniforge \
--to=void@manifault.com \
--cc=himadrispandya@gmail.com \
--cc=julia.lawall@inria.fr \
--cc=kernel-team@meta.com \
--cc=linux-trace-devel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=rostedt@goodmis.org \
/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