]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: at76c50x: fix use after free access in at76_disconnect
authorAbdun Nihaal <abdun.nihaal@gmail.com>
Sun, 30 Mar 2025 10:31:10 +0000 (16:01 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Apr 2025 08:45:38 +0000 (10:45 +0200)
commit7ca513631fa6ad3011b8b9197cdde0f351103704
tree79a5b1cd0c3a6f7cdf23d1d0ebb02b08f96ab446
parenta70ea9296419161d25ce586a8e91f0a5f5d48742
wifi: at76c50x: fix use after free access in at76_disconnect

[ Upstream commit 27c7e63b3cb1a20bb78ed4a36c561ea4579fd7da ]

The memory pointed to by priv is freed at the end of at76_delete_device
function (using ieee80211_free_hw). But the code then accesses the udev
field of the freed object to put the USB device. This may also lead to a
memory leak of the usb device. Fix this by using udev from interface.

Fixes: 29e20aa6c6af ("at76c50x-usb: fix use after free on failure path in at76_probe()")
Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://patch.msgid.link/20250330103110.44080-1-abdun.nihaal@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/atmel/at76c50x-usb.c