From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Kees Cook <keescook@chromium.org>
Cc: linux-kernel@vger.kernel.org, Josh Triplett <josh@joshtriplett.org>
Subject: Re: [PATCH] rcutorture: avoid format string leak to thead name
Date: Thu, 22 May 2014 12:56:29 -0700 [thread overview]
Message-ID: <20140522195629.GX4570@linux.vnet.ibm.com> (raw)
In-Reply-To: <20140522185104.GA8674@www.outflux.net>
On Thu, May 22, 2014 at 11:51:04AM -0700, Kees Cook wrote:
> Since the rcutorture thread creation interface does not include format
> string arguments, make sure the name can never be accidentally processed
> as a format string.
>
> Signed-off-by: Kees Cook <keescook@chromium.org>
Queued for 3.17, thank you, Kees!
Thanx, Paul
> ---
> kernel/torture.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/torture.c b/kernel/torture.c
> index acc9afc2f26e..9dad2ffaf995 100644
> --- a/kernel/torture.c
> +++ b/kernel/torture.c
> @@ -694,7 +694,7 @@ int _torture_create_kthread(int (*fn)(void *arg), void *arg, char *s, char *m,
> int ret = 0;
>
> VERBOSE_TOROUT_STRING(m);
> - *tp = kthread_run(fn, arg, s);
> + *tp = kthread_run(fn, arg, "%s", s);
> if (IS_ERR(*tp)) {
> ret = PTR_ERR(*tp);
> VERBOSE_TOROUT_ERRSTRING(f);
> --
> 1.7.9.5
>
>
> --
> Kees Cook
> Chrome OS Security
>
next prev parent reply other threads:[~2014-05-22 19:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-22 18:51 [PATCH] rcutorture: avoid format string leak to thead name Kees Cook
2014-05-22 19:56 ` Paul E. McKenney [this message]
2014-05-22 21:15 ` Josh Triplett
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=20140522195629.GX4570@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=josh@joshtriplett.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.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