netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* potential overflow in de4x5.c
@ 2010-01-03 10:13 Dan Carpenter
  2010-01-04  7:28 ` Grant Grundler
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2010-01-03 10:13 UTC (permalink / raw)
  To: Grant Grundler; +Cc: Kyle McMartin, netdev

Hi I found this using smatch (http://repo.or.cz/w/smatch.git).

drivers/net/tulip/de4x5.c
  4772          lp->active = *p++;
  4773          if (MOTO_SROM_BUG) lp->active = 0;
  4774          lp->phy[lp->active].gep = (*p ? p : NULL); p += (2 * (*p) + 1);

lp->phy is an array of size 8.

MOTO_SROM_BUG is defined like this. 

#define MOTO_SROM_BUG    (lp->active == 8 && (get_unaligned_le32(dev->dev_addr) & 0x00ffffff) == 0x3e0008)

If lp->active == 8 then we have a buffer overflow.

regards,
dan carpenter

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

end of thread, other threads:[~2010-01-13  4:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-03 10:13 potential overflow in de4x5.c Dan Carpenter
2010-01-04  7:28 ` Grant Grundler
2010-01-04  7:35   ` Grant Grundler
2010-01-07 15:40     ` Dan Carpenter
2010-01-13  4:31       ` Grant Grundler

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).