Skip to contentSkip to conversation

qlge: avoid format string exposure in workqueue

PATCH Applied Kees Cook 2 participants 2 messages Apr 5, 2017 – Apr 6, 2017

Subsystems (2)
lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH 1/1 qlge: avoid format string exposure in workqueue

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

---
 drivers/net/ethernet/qlogic/qlge/qlge_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/qlogic/qlge/qlge_main.c +2 -1
index e9e647072596..1188d420fe53 100644
@@ -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);
Signature · 6 lines
2.7.4


-- 
Kees Cook
Pixel Security