From: Dan Carpenter <error27@gmail.com>
To: linux-wireless@vger.kernel.org
Cc: linville@tuxdriver.com, yi.zhu@intel.com
Subject: re: iwmc3200wifi: fix array out-of-boundary access
Date: Sat, 2 Jan 2010 16:09:57 +0200 [thread overview]
Message-ID: <20100102140957.GB5076@bicker> (raw)
It don't think 6c853da3f30c93 is right. That's the patch
titled "iwmc3200wifi: fix array out-of-boundary access"
Allocate priv->rx_packets[IWM_RX_ID_HASH + 1] because the max array
index is IWM_RX_ID_HASH according to IWM_RX_ID_GET_HASH().
In 2.6.33-rc2 IWM_RX_ID_GET_HASH() doesn't go as high as IWM_RX_ID_HASH
and I don't see any array out-of-bounds.
#define IWM_RX_ID_GET_HASH(id) ((id) % IWM_RX_ID_HASH)
All the other code has the same assumptions.
Cscope tag: IWM_RX_ID_HASH
# line filename / context / line
1 175 drivers/net/wireless/iwmc3200wifi/iwm.h <<GLOBAL>>
#define IWM_RX_ID_HASH 0xff
2 271 drivers/net/wireless/iwmc3200wifi/iwm.h <<GLOBAL>>
struct list_head rx_packets[IWM_RX_ID_HASH];
3 292 drivers/net/wireless/iwmc3200wifi/debugfs.c <<iwm_debugfs_rx_ticket_read>>
for (i = 0; i < IWM_RX_ID_HASH; i++) {
4 176 drivers/net/wireless/iwmc3200wifi/iwm.h <<IWM_RX_ID_GET_HASH>>
#define IWM_RX_ID_GET_HASH(id) ((id) % IWM_RX_ID_HASH)
5 279 drivers/net/wireless/iwmc3200wifi/main.c <<iwm_priv_init>>
for (i = 0; i < IWM_RX_ID_HASH; i++)
6 396 drivers/net/wireless/iwmc3200wifi/rx.c <<iwm_rx_free>>
for (i = 0; i < IWM_RX_ID_HASH; i++) {
regards,
dan carpenter
next reply other threads:[~2010-01-02 14:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-02 14:09 Dan Carpenter [this message]
2010-01-05 3:48 ` iwmc3200wifi: fix array out-of-boundary access Zhu Yi
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=20100102140957.GB5076@bicker \
--to=error27@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=yi.zhu@intel.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).