Commit 4ede2cf2 authored by Alexander Wetzel's avatar Alexander Wetzel Committed by sanglipeng
Browse files

wifi: cfg80211: Fix use after free for wext

stable inclusion
from stable-v5.10.173
commit 2cfe78619b0de6d2da773978bc2d22797212eaa7
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8BFR3

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=2cfe78619b0de6d2da773978bc2d22797212eaa7

--------------------------------

commit 015b8cc5 upstream.

Key information in wext.connect is not reset on (re)connect and can hold
data from a previous connection.

Reset key data to avoid that drivers or mac80211 incorrectly detect a
WEP connection request and access the freed or already reused memory.

Additionally optimize cfg80211_sme_connect() and avoid an useless
schedule of conn_work.

Fixes: fffd0934 ("cfg80211: rework key operation")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230124141856.356646-1-alexander@wetzel-home.de


Signed-off-by: default avatarAlexander Wetzel <alexander@wetzel-home.de>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent d4db29ab
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment