From: Pavel Roskin <proski@gnu.org>
To: Ivo Van Doorn <ivdoorn@gmail.com>
Cc: linux-wireless@vger.kernel.org, rt2400-devel@lists.sourceforge.net
Subject: Re: [PATCH] rt2x00: fix memory corruption caused by eeprom buffer overflow
Date: Mon, 19 Feb 2007 08:51:39 -0500 [thread overview]
Message-ID: <1171893099.8550.23.camel@dv> (raw)
In-Reply-To: <a32f33a40702190307x2861b654s6233a6b9858e8233@mail.gmail.com>
On Mon, 2007-02-19 at 12:07 +0100, Ivo Van Doorn wrote:
> hi
>
> > diff --git a/drivers/net/wireless/d80211/rt2x00/rt73usb.c b/drivers/net/wireless/d80211/rt2x00/rt73usb.c
> > index be66e2f..6fa5a7e 100644
> > --- a/drivers/net/wireless/d80211/rt2x00/rt73usb.c
> > +++ b/drivers/net/wireless/d80211/rt2x00/rt73usb.c
> > @@ -2705,7 +2705,7 @@ static int rt73usb_alloc_eeprom(struct rt2x00_dev *rt2x00dev)
> > * Allocate the eeprom memory, check the eeprom width
> > * and copy the entire eeprom into this allocated memory.
> > */
> > - rt2x00dev->eeprom = kzalloc(EEPROM_SIZE, GFP_KERNEL);
> > + rt2x00dev->eeprom = kzalloc(EEPROM_SIZE, GFP_KERNEL * sizeof(u16));
> > if (!rt2x00dev->eeprom)
> > return -ENOMEM;
>
> you might want to change this to EEPROM_SIZE * sizeof(u16). ;)
Shame on me. I wrote a patch that worked on rt61, and then I discarded
it to make a "clean" fix for all drivers.
But anyway, I'm seeing now that CVS on sourceforge.net is not abandoned,
so I think the best approach would be to integrate it into the kernel.
It would be great if you remove dead code from CVS, all those
"experimental" branches that haven't been touched for months if not
years. It was hard for me to find the actual sources. I would have
spent last Sunday evening doing something more interesting than fixing
fixed bugs :)
Finally, I'll appreciate if the driver is fixed to compile against
wireless-dev kernels. You can take an approach similar to iwlwifi and
even rely on the same d80211 package.
--
Regards,
Pavel Roskin
next prev parent reply other threads:[~2007-02-19 13:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-19 2:46 [PATCH] rt2x00: fix memory corruption caused by eeprom buffer overflow Pavel Roskin
2007-02-19 10:38 ` Ivo Van Doorn
2007-02-19 11:07 ` Ivo Van Doorn
2007-02-19 13:51 ` Pavel Roskin [this message]
2007-02-19 14:11 ` Ivo Van Doorn
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=1171893099.8550.23.camel@dv \
--to=proski@gnu.org \
--cc=ivdoorn@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=rt2400-devel@lists.sourceforge.net \
/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).