Search Linux Wireless

Re: [PATCH v2] mac80211: report some VHT radiotap infos for tx status

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

 



On Thu, Aug 01, 2013 at 09:35:54AM +0200, Johannes Berg wrote:
> On Sat, 2013-07-27 at 11:47 +0200, Karl Beldan wrote:
> 
> > +		/* required alignment from rthdr */
> > +		pos = (u8 *)rthdr + ALIGN(pos - (u8 *)rthdr, 2);
> 
> This is bad, it potentially leaks a byte of kernel data, please
> explicitly clear the padding, like
> 
> if ((pos - (u8 *)rthdr) & 1)
>   *pos++ = 0;
> 
I don't see what's wrong.
The whole radiotap space is already zeroed, as for the 'leaks' I don't
see how it could leak either.
Though, if you prefer, I can replace
	pos = (u8 *)rthdr + ALIGN(pos - (u8 *)rthdr, 2);
with:
	if ((pos - (u8 *)rthdr) & 1)
		pos++;

-- 
Karl
--
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 Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux