All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] qlge: avoid format string exposure in workqueue
@ 2017-04-05 21:39 Kees Cook
  2017-04-06 20:37 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Kees Cook @ 2017-04-05 21:39 UTC (permalink / raw)
  To: linux-kernel; +Cc: Harish Patil, Manish Chopra, Dept-GELinuxNICDev, netdev

While unlikely, this makes sure the workqueue name won't be processed
as a format string.

Signed-off-by: Kees Cook <keescook@chromium.org>
---
 drivers/net/ethernet/qlogic/qlge/qlge_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
index e9e647072596..1188d420fe53 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
@@ -4686,7 +4686,8 @@ static int ql_init_device(struct pci_dev *pdev, struct net_device *ndev,
 	/*
 	 * Set up the operating parameters.
 	 */
-	qdev->workqueue = alloc_ordered_workqueue(ndev->name, WQ_MEM_RECLAIM);
+	qdev->workqueue = alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM,
+						  ndev->name);
 	INIT_DELAYED_WORK(&qdev->asic_reset_work, ql_asic_reset_work);
 	INIT_DELAYED_WORK(&qdev->mpi_reset_work, ql_mpi_reset_work);
 	INIT_DELAYED_WORK(&qdev->mpi_work, ql_mpi_work);
-- 
2.7.4


-- 
Kees Cook
Pixel Security

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] qlge: avoid format string exposure in workqueue
  2017-04-05 21:39 [PATCH] qlge: avoid format string exposure in workqueue Kees Cook
@ 2017-04-06 20:37 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-04-06 20:37 UTC (permalink / raw)
  To: keescook
  Cc: linux-kernel, harish.patil, manish.chopra, Dept-GELinuxNICDev, netdev

From: Kees Cook <keescook@chromium.org>
Date: Wed, 5 Apr 2017 14:39:03 -0700

> While unlikely, this makes sure the workqueue name won't be processed
> as a format string.
> 
> Signed-off-by: Kees Cook <keescook@chromium.org>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-06 20:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-05 21:39 [PATCH] qlge: avoid format string exposure in workqueue Kees Cook
2017-04-06 20:37 ` David Miller

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.