From: Dan Carpenter <error27@gmail.com>
To: Grant Grundler <grundler@parisc-linux.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>, netdev@vger.kernel.org
Subject: potential overflow in de4x5.c
Date: Sun, 3 Jan 2010 12:13:56 +0200 [thread overview]
Message-ID: <20100103101356.GA13023@bicker> (raw)
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
next reply other threads:[~2010-01-03 10:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-03 10:13 Dan Carpenter [this message]
2010-01-04 7:28 ` potential overflow in de4x5.c Grant Grundler
2010-01-04 7:35 ` Grant Grundler
2010-01-07 15:40 ` Dan Carpenter
2010-01-13 4:31 ` Grant Grundler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100103101356.GA13023@bicker \
--to=error27@gmail.com \
--cc=grundler@parisc-linux.org \
--cc=kyle@mcmartin.ca \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).