lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c6b1100b0905101529tfafe11p3ddcbf4b604ddd29@mail.gmail.com>
Date:	Sun, 10 May 2009 22:29:04 +0000
From:	Chris Clayton <chris2553@...glemail.com>
To:	Jiri Slaby <jirislaby@...il.com>
Cc:	linux-wireless@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: Oops in wireless from today's git

2009/5/10 Jiri Slaby <jirislaby@...il.com>:
> On 05/10/2009 09:39 PM, Chris Clayton wrote:
>> I've just done a git pull and built, installed and booted the kernel.
>> Unfortunately I got the oops below.
>
> What's your HEAD? Looks like the issue solved by
> 0cc113d866fa87c1455cbaff8d1f7ac054090bd5.
>

Sorry, I'm a real novice git user, but if by HEAD you mean the latest
commit, its a4d7749be5de4a7261bcbe3c7d96c748792ec455. The file
.git/FETCH_HEAD contains:

a4d7749be5de4a7261bcbe3c7d96c748792ec455                branch
'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6


I've done some investigating and found that reverting the following
patch prevents the oops:

mac80211: minstrel, fix memory corruption

minstrel doesn't count max rate count in fact, since it doesn't use
a loop variable `i' and hence allocs space only for bitrates found in
the first band.

Fix it by involving the `i' as an index so that it traverses all the
bands now and finds the real max bitrate count.

Signed-off-by: Jiri Slaby <jirislaby@...il.com>
Cc: Felix Fietkau <nbd@...nwrt.org>
Signed-off-by: John W. Linville <linville@...driver.com>
---

diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c
index 3824990..70df3dc 100644
--- a/net/mac80211/rc80211_minstrel.c
+++ b/net/mac80211/rc80211_minstrel.c
@@ -476,7 +476,7 @@ minstrel_alloc_sta(void *priv, struct
ieee80211_sta *sta, gfp_t gfp)
                return NULL;

        for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
-               sband = hw->wiphy->bands[hw->conf.channel->band];
+               sband = hw->wiphy->bands[i];
                if (sband->n_bitrates > max_rates)
                        max_rates = sband->n_bitrates;
        }

I can also prevent the oops by applying this patch:

--- linux-2.6/net/mac80211/rc80211_minstrel.c.save      2009-05-10
21:53:34.000000000 +0000
+++ linux-2.6/net/mac80211/rc80211_minstrel.c   2009-05-10
21:53:57.000000000 +0000
@@ -477,7 +477,7 @@ minstrel_alloc_sta(void *priv, struct ie

        for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
                sband = hw->wiphy->bands[i];
-               if (sband->n_bitrates > max_rates)
+               if (sband && sband->n_bitrates > max_rates)
                        max_rates = sband->n_bitrates;
        }


-- 
No, Sir; there is nothing which has yet been contrived by man, by which
so much happiness is produced as by a good tavern or inn - Doctor Samuel
Johnson
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ