linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* re: cw1200: add driver for the ST-E CW1100 & CW1200 WLAN chipsets
@ 2013-06-04 13:09 Dan Carpenter
  2013-06-04 13:43 ` Solomon Peachy
  0 siblings, 1 reply; 6+ messages in thread
From: Dan Carpenter @ 2013-06-04 13:09 UTC (permalink / raw)
  To: pizza; +Cc: linux-wireless

Hello Solomon Peachy,

The patch a910e4a94f69: "cw1200: add driver for the ST-E CW1100 &
CW1200 WLAN chipsets" from May 24, 2013, has poor input validation
so the user could write to arbitrary memory.

Also I think this API looks like things which should be done with
normal ioctls.  This driver only lets you load the firmware using a
very ugly custom debugfs interface?

drivers/net/wireless/cw1200/debug.c
   454  
   455          if (!count)
   456                  goto done;
   457  
   458          if (copy_from_user(etf->buf + etf->written, user_buf + written,
   459                             count)) {

"count" isn't capped so we could overwrite etf->written on the first
write and then write to arbitrary memery on the second write.

   460                  pr_err("copy_from_user (payload %zu) failed\n", count);
   461                  return -EFAULT;
   462          }

regards,
dan carpenter


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

end of thread, other threads:[~2013-06-05 19:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-04 13:09 cw1200: add driver for the ST-E CW1100 & CW1200 WLAN chipsets Dan Carpenter
2013-06-04 13:43 ` Solomon Peachy
2013-06-05  8:06   ` Kalle Valo
2013-06-05 11:12     ` Solomon Peachy
2013-06-05 11:36       ` Kalle Valo
2013-06-05 19:11         ` Solomon Peachy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).