Skip to content

Commit

Permalink
net: ethernet: wiznet: avoid format string exposure
Browse files Browse the repository at this point in the history
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 <keescook@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Kees Cook authored and David S. Miller committed Apr 6, 2017
1 parent df656bf commit 129858f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/wiznet/w5100.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 129858f

Please sign in to comment.