From: Michael Buesch <mb@bu3sch.de>
To: John Linville <linville@tuxdriver.com>
Cc: bcm43xx-dev@lists.berlios.de, linux-wireless@vger.kernel.org,
Larry Finger <Larry.Finger@lwfinger.net>
Subject: [PATCH] b43: debugfs SHM read buffer overrun fix
Date: Fri, 2 Nov 2007 18:35:02 +0100 [thread overview]
Message-ID: <200711021835.02371.mb@bu3sch.de> (raw)
Fix possible buffer overrun.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
---
We are searching a new b43legacy maintainer.
So if someone is interested in this job, please start with porting
this easy patch to b43legacy. ;)
Index: wireless-2.6/drivers/net/wireless/b43/debugfs.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/b43/debugfs.c 2007-11-02 18:26:55.000000000 +0100
+++ wireless-2.6/drivers/net/wireless/b43/debugfs.c 2007-11-02 18:28:24.000000000 +0100
@@ -128,7 +128,7 @@ static ssize_t shm_read_file(struct b43_
__le16 *le16buf = (__le16 *)buf;
for (i = 0; i < 0x1000; i++) {
- if (bufsize <= 0)
+ if (bufsize < sizeof(tmp))
break;
tmp = b43_shm_read16(dev, B43_SHM_SHARED, 2 * i);
le16buf[i] = cpu_to_le16(tmp);
reply other threads:[~2007-11-02 17:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200711021835.02371.mb@bu3sch.de \
--to=mb@bu3sch.de \
--cc=Larry.Finger@lwfinger.net \
--cc=bcm43xx-dev@lists.berlios.de \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/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).