From: Johannes Berg <johannes@sipsolutions.net>
To: Hin-Tak Leung <hintak.leung@gmail.com>
Cc: "Luis R. Rodriguez" <lrodriguez@atheros.com>,
"John W. Linville" <linville@tuxdriver.com>,
linux-wireless@vger.kernel.org
Subject: Re: NULL pointer deref at wext ioctl (Re: [PATCH] compat-2.6: adding ethtool.h to compat-2.6.31.h)
Date: Thu, 08 Oct 2009 11:51:54 +0200 [thread overview]
Message-ID: <1254995514.3713.22.camel@johannes.local> (raw)
In-Reply-To: <3ace41890910072328n1460ee34v1fe7ca9b78eb646f@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1104 bytes --]
On Thu, 2009-10-08 at 07:28 +0100, Hin-Tak Leung wrote:
> It looks like it is the 2nd of thes two lines around
> /usr/src/debug/kernel-2.6.30/linux-2.6.30.x86_64/net/wireless/wext.c:448
> which resulted in the null pointer dereference:
>
> if (index < dev->wireless_handlers->num_private)
> return dev->wireless_handlers->private[index];
Ok, that's odd. Is it possible that somehow cfg80211 is picking up an
#ifdef'ed copy of "struct iw_handler_def", and thus the struct it is
defining is simply too small? You can figure that out with debug info,
presumably, but I'm not entirely sure how. Actually maybe nm would tell
you too, if you look for cfg80211_wext_handler.
What I mean is this -- cfg80211 defines cfg80211_wext_handler:
const struct iw_handler_def cfg80211_wext_handler
.num_standard
.standard
.get_wireless_stats
but the core expects
.num_standard
.standard
.num_private
.num_private_args
.private
.private_args
.get_wireless_stats
as such .num_private ends up non-zero because it's shadowed
by .get_wireles_stats.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
next prev parent reply other threads:[~2009-10-08 9:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-07 19:16 NULL pointer deref at wext ioctl (Re: [PATCH] compat-2.6: adding ethtool.h to compat-2.6.31.h) Hin-Tak Leung
2009-10-07 19:28 ` Hin-Tak Leung
2009-10-07 22:01 ` Johannes Berg
2009-10-08 6:28 ` Hin-Tak Leung
2009-10-08 9:51 ` Johannes Berg [this message]
2009-10-08 11:50 ` Johannes Berg
2009-10-08 13:43 ` Luis R. Rodriguez
2009-10-08 14:28 ` Luis R. Rodriguez
2009-10-08 14:43 ` John W. Linville
2009-10-08 14:59 ` Luis R. Rodriguez
2009-10-08 23:22 ` Hin-Tak Leung
2009-10-09 0:14 ` Luis R. Rodriguez
2009-10-09 8:05 ` Johannes Berg
2009-10-13 21:04 ` Luis R. Rodriguez
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=1254995514.3713.22.camel@johannes.local \
--to=johannes@sipsolutions.net \
--cc=hintak.leung@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=lrodriguez@atheros.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