• Johannes Berg's avatar
    mac80211: initialize fast-xmit 'info' later · 35f432a0
    Johannes Berg authored
    In ieee80211_xmit_fast(), 'info' is initialized to point to the skb
    that's passed in, but that skb may later be replaced by a clone (if
    it was shared), leading to an invalid pointer.
    
    This can lead to use-after-free and also later crashes since the
    real SKB's info->hw_queue doesn't get initialized properly.
    
    Fix this by assigning info only later, when it's needed, after the
    skb replacement (may have) happened.
    
    Cc: stable@vger.kernel.org
    Reported-by: default avatarBen Greear <greearb@candelatech.com>
    Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    35f432a0
tx.c 122 KB