Skip to content
Commit 00fb850c authored by 蒋家盛's avatar 蒋家盛 Committed by Greg Kroah-Hartman
Browse files

mac80211: mlme: check for null after calling kmemdup

commit a72c01a9 upstream.

As the possible failure of the alloc, the ifmgd->assoc_req_ies might be
NULL pointer returned from kmemdup().
Therefore it might be better to free the skb and return error in order
to fail the association, like ieee80211_assoc_success().
Also, the caller, ieee80211_do_assoc(), needs to deal with the return
value from ieee80211_send_assoc().

Fixes: 4d9ec73d

 ("cfg80211: Report Association Request frame IEs in association events")
Signed-off-by: default avatarJiasheng Jiang <jiasheng@iscas.ac.cn>
Link: https://lore.kernel.org/r/20220105081559.23870831

-1-jiasheng@iscas.ac.cn
[fix some paths to be errors, not success]
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 61e8fc49
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment