ASoC: Intel: avoid format string leak to thread name
Subsystems (3)
PATCH 1/1 ASoC: Intel: avoid format string leak to thread name
This makes sure a format string can never get processed into the worker thread name from the device name.
Signed-off-by Kees Cook <[email protected]>
--- sound/soc/intel/sst-baytrail-ipc.c | 2 +- sound/soc/intel/sst-haswell-ipc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
sound/soc/intel/sst-baytrail-ipc.c +1 -1
@@ -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);
sound/soc/intel/sst-haswell-ipc.c +1 -1
@@ -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);
Signature · 6 lines
1.7.9.5 -- Kees Cook Chrome OS Security
Quoted 27 lines · Kees Cook
This makes sure a format string can never get processed into the worker thread name from the device name.
Signed-off-by Kees Cook <[email protected]>--- sound/soc/intel/sst-baytrail-ipc.c | 2 +- sound/soc/intel/sst-haswell-ipc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)sound/soc/intel/sst-baytrail-ipc.c +1
-1@@ -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);sound/soc/intel/sst-haswell-ipc.c +0
-0
sound/soc/intel/sst-haswell-ipc.c int sst_hsw_dsp_init(struct device *dev, struct sst_pdata *pdata) · line 1741
Quoted 8 lines
sound/soc/intel/sst-haswell-ipc.c +1
-1@@ -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 <[email protected]>
Quoted 2 lines · Kees Cook
This makes sure a format string can never get processed into the worker thread name from the device name.
Applied, thanks.