Search Linux Wireless

Re: [PATCH 1/1] mac80211: don't accept WEP keys other than WEP40 and WEP104

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jun 28, 2008 at 10:57 AM, Johannes Berg
<johannes@xxxxxxxxxxxxxxxx> wrote:
> On Sat, 2008-06-28 at 08:46 +0200, drago01 wrote:
>
>> > +/**
>> > + * enum ieee80211_key_len - key length
>> > + * @WEP40: WEP 5 byte long key
>> > + * @WEP104: WEP 13 byte long key
>> > + */
>> > +enum ieee80211_key_len {
>> > +       LEN_WEP40 = 5,
>> > +       LEN_WEP104 = 13,
>> > +};
>
>
>> > +               if (alg == ALG_WEP &&
>
>> What about 0 ?
>> See http://marc.info/?l=linux-wireless&m=121458316301507&w=2
>
>
> I don't think zero-keylen will have WEP there, will it? I don't really
> know though.

This patch  pushes the length check to ieee80211_set_encryption.
Unlike John's patch
where check was done in ieee80211_ioctl_siwencode.
The benefit of this is that both ENCODE end ENCODEEXT are treated.
The zero length key i.e. changing index is already taken care of in
ieee80211_ioctl_siwencode

<snip>
if (erq->flags & IW_ENCODE_DISABLED)
		remove = 1;
else if (erq->length == 0) {
		/* No key data - just set the default TX key index */
		ieee80211_set_default_key(sdata, idx);
		return 0;
}
</snip>

Tomas
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux