]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
Bluetooth: L2CAP: Fix use-after-free in l2cap_disconnect_{req,rsp}
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 6 Apr 2023 16:33:09 +0000 (09:33 -0700)
committerRoxana Nicolescu <roxana.nicolescu@canonical.com>
Wed, 17 May 2023 11:34:07 +0000 (13:34 +0200)
commitd7a7fcf246d69816acbe08edfa9c47725c898966
treeb49956712cf96533f2b8cc18cf45a53f73864d93
parente1c338cd34fada0f6fa980a5afc3401261029690
Bluetooth: L2CAP: Fix use-after-free in l2cap_disconnect_{req,rsp}

BugLink: https://bugs.launchpad.net/bugs/2017219
commit a2a9339e1c9deb7e1e079e12e27a0265aea8421a upstream.

Similar to commit d0be8347c623 ("Bluetooth: L2CAP: Fix use-after-free
caused by l2cap_chan_put"), just use l2cap_chan_hold_unless_zero to
prevent referencing a channel that is about to be destroyed.

Cc: stable@kernel.org
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Min Li <lm0963hack@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
net/bluetooth/l2cap_core.c