Search Linux Wireless

Re: [PATCH 1/2] mac80211: validate skb->dev in the tx status path

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

 



On 09/07/2012 08:28 AM, Johannes Berg wrote:
On Fri, 2012-09-07 at 08:24 -0700, Ben Greear wrote:
On 09/07/2012 07:54 AM, Felix Fietkau wrote:
skb->dev might contain a stale reference to a device that was already
deleted, and using it unchecked can lead to invalid pointer accesses.
Since this is only used for nl80211 tx, iterate over active interfaces
to find a match for skb->dev, and discard the tx status if the device
is gone.

Nasty performance hit if we have lots of virtual
interfaces, eh?  Maybe some sort of ref-counting
would be better?  Or a hashed lookup on the netdev
pointer/token?

As Felix also pointed out to me, no. Frames that need to go to nl80211
should be rare, this isn't the common case.

Ahh, ok.  I was thinking each transmitted pkt would cause this code
to run.

Thanks,
Ben


johannes



--
Ben Greear <greearb@xxxxxxxxxxxxxxx>
Candela Technologies Inc  http://www.candelatech.com

--
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