lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aYmsQfujoAe5qO02@stanley.mountain>
Date: Mon, 9 Feb 2026 12:43:29 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Chen-Yu Tsai <wenst@...omium.org>
Cc: Francesco Dolcini <francesco@...cini.it>,
	linux-wireless@...r.kernel.org,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: [bug report] wifi: mwifiex: Allocate dev name earlier for interface
 workqueue name

[ Smatch checking is paused while we raise funding. #SadFace
  https://lore.kernel.org/all/aTaiGSbWZ9DJaGo7@stanley.mountain/ -dan ]

Hello Chen-Yu Tsai,

Commit 7bab5bdb81e3 ("wifi: mwifiex: Allocate dev name earlier for
interface workqueue name") from Jan 7, 2026 (linux-next), leads to
the following Smatch static checker warning:

	drivers/net/wireless/marvell/mwifiex/cfg80211.c:3214 mwifiex_add_virtual_intf()
	warn: passing positive error code '(-23)-(-22),(-12),1-64' to 'ERR_PTR'

drivers/net/wireless/marvell/mwifiex/cfg80211.c
  3147  
  3148          SET_NETDEV_DEV(dev, adapter->dev);
  3149  
  3150          ret = dev_alloc_name(dev, name);
  3151          if (ret)
  3152                  goto err_alloc_name;

The dev_alloc_name() function can return 1-64 if the name has a "%d" in
it.  None of the other nine callers use the positive returns.  The only
thing it does is cause a crash here.  We should probably fix
dev_alloc_name() as well as changing this to if (ret < 0) {.

  3153  
  3154          priv->dfs_cac_workqueue = alloc_workqueue("MWIFIEX_DFS_CAC-%s",
  3155                                                    WQ_HIGHPRI |
  3156                                                    WQ_MEM_RECLAIM |
  3157                                                    WQ_UNBOUND, 0, dev->name);
  3158          if (!priv->dfs_cac_workqueue) {
  3159                  mwifiex_dbg(adapter, ERROR, "cannot alloc DFS CAC queue\n");
  3160                  ret = -ENOMEM;
  3161                  goto err_alloc_cac;
  3162          }
  3163  

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ