Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df431844 authored by Brooke Basile's avatar Brooke Basile Committed by Greg Kroah-Hartman
Browse files

ath9k: hif_usb: fix race condition between usb_get_urb() and usb_kill_anchored_urbs()



[ Upstream commit 03fb92a432ea5abe5909bca1455b7e44a9380480 ]

Calls to usb_kill_anchored_urbs() after usb_kill_urb() on multiprocessor
systems create a race condition in which usb_kill_anchored_urbs() deallocates
the URB before the completer callback is called in usb_kill_urb(), resulting
in a use-after-free.
To fix this, add proper lock protection to usb_kill_urb() calls that can
possibly run concurrently with usb_kill_anchored_urbs().

Reported-by: default avatar <syzbot+89bd486af9427a9fc605@syzkaller.appspotmail.com>
Link: https://syzkaller.appspot.com/bug?id=cabffad18eb74197f84871802fd2c5117b61febf


Signed-off-by: default avatarBrooke Basile <brookebasile@gmail.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200911071427.32354-1-brookebasile@gmail.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 03e738d3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment