net: ethernet: wiznet: avoid format string exposure
Subsystems (3)
PATCH 1/1 net: ethernet: wiznet: avoid format string exposure
While unlikely, this makes sure any format strings in the device name can't exposure information via the resulting workqueue name.
Signed-off-by Kees Cook <[email protected]>
--- drivers/net/ethernet/wiznet/w5100.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/wiznet/w5100.c +2 -1
@@ -1152,7 +1152,8 @@ int w5100_probe(struct device *dev, const struct w5100_ops *ops,if (err <0 ) goto err_register; - priv->xfer_wq =alloc_workqueue (netdev_name (ndev),WQ_MEM_RECLAIM ,0 ); + priv->xfer_wq =alloc_workqueue ("%s" ,WQ_MEM_RECLAIM ,0 , +netdev_name (ndev));if (!priv->xfer_wq) { err = -ENOMEM ; goto err_wq;
Signature · 6 lines
2.7.4 -- Kees Cook Pixel Security
From: Kees Cook <[email protected]>
Date: Wed, 5 Apr 2017 14:39:35 -0700
Quoted 4 lines
While unlikely, this makes sure any format strings in the device name can't exposure information via the resulting workqueue name.
Signed-off-by Kees Cook <[email protected]>
Applied.