From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: Kees Cook <keescook@chromium.org>, linux-kernel@vger.kernel.org
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.de>, Wenkai Du <wenkai.du@intel.com>,
Dan Carpenter <dan.carpenter@oracle.com>,
Christian Engelmayer <cengelma@gmx.at>,
alsa-devel@alsa-project.org
Subject: Re: [PATCH] ASoC: Intel: avoid format string leak to thread name
Date: Fri, 23 May 2014 10:13:56 +0300 [thread overview]
Message-ID: <537EF534.5060908@linux.intel.com> (raw)
In-Reply-To: <20140522184355.GA8301@www.outflux.net>
On 05/22/2014 09:43 PM, Kees Cook wrote:
> This makes sure a format string can never get processed into the worker
> thread name from the device name.
>
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
> sound/soc/intel/sst-baytrail-ipc.c | 2 +-
> sound/soc/intel/sst-haswell-ipc.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/intel/sst-baytrail-ipc.c b/sound/soc/intel/sst-baytrail-ipc.c
> index 0d31dbbf4806..1b25bf168beb 100644
> --- a/sound/soc/intel/sst-baytrail-ipc.c
> +++ b/sound/soc/intel/sst-baytrail-ipc.c
> @@ -809,7 +809,7 @@ int sst_byt_dsp_init(struct device *dev, struct sst_pdata *pdata)
> /* start the IPC message thread */
> init_kthread_worker(&byt->kworker);
> byt->tx_thread = kthread_run(kthread_worker_fn,
> - &byt->kworker,
> + &byt->kworker, "%s",
> dev_name(byt->dev));
> if (IS_ERR(byt->tx_thread)) {
> err = PTR_ERR(byt->tx_thread);
> diff --git a/sound/soc/intel/sst-haswell-ipc.c b/sound/soc/intel/sst-haswell-ipc.c
> index e7996b39a484..a8fd60c67341 100644
> --- a/sound/soc/intel/sst-haswell-ipc.c
> +++ b/sound/soc/intel/sst-haswell-ipc.c
> @@ -1735,7 +1735,7 @@ int sst_hsw_dsp_init(struct device *dev, struct sst_pdata *pdata)
> /* start the IPC message thread */
> init_kthread_worker(&hsw->kworker);
> hsw->tx_thread = kthread_run(kthread_worker_fn,
> - &hsw->kworker,
> + &hsw->kworker, "%s",
> dev_name(hsw->dev));
> if (IS_ERR(hsw->tx_thread)) {
> ret = PTR_ERR(hsw->tx_thread);
This is not very fatal as name comes from sound/soc/intel/sst-acpi.c so
only developer can hit this but to be on safe side:
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
next prev parent reply other threads:[~2014-05-23 7:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-22 18:43 [PATCH] ASoC: Intel: avoid format string leak to thread name Kees Cook
2014-05-23 7:13 ` Jarkko Nikula [this message]
2014-05-26 13:31 ` Mark Brown
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=537EF534.5060908@linux.intel.com \
--to=jarkko.nikula@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=cengelma@gmx.at \
--cc=dan.carpenter@oracle.com \
--cc=keescook@chromium.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.de \
--cc=wenkai.du@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.