Commit a2a9339
committed
Bluetooth: L2CAP: Fix use-after-free in l2cap_disconnect_{req,rsp}
Similar to commit d0be834 ("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>1 parent d2e4f1b commit a2a9339
1 file changed
Lines changed: 6 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4652 | 4652 | | |
4653 | 4653 | | |
4654 | 4654 | | |
4655 | | - | |
4656 | | - | |
4657 | | - | |
| 4655 | + | |
4658 | 4656 | | |
4659 | | - | |
4660 | 4657 | | |
4661 | 4658 | | |
4662 | 4659 | | |
4663 | 4660 | | |
4664 | | - | |
4665 | | - | |
4666 | | - | |
4667 | 4661 | | |
4668 | 4662 | | |
4669 | 4663 | | |
4670 | 4664 | | |
4671 | 4665 | | |
4672 | 4666 | | |
| 4667 | + | |
4673 | 4668 | | |
| 4669 | + | |
4674 | 4670 | | |
4675 | 4671 | | |
4676 | 4672 | | |
4677 | 4673 | | |
4678 | 4674 | | |
4679 | 4675 | | |
4680 | | - | |
4681 | | - | |
4682 | 4676 | | |
4683 | 4677 | | |
4684 | 4678 | | |
| |||
4698 | 4692 | | |
4699 | 4693 | | |
4700 | 4694 | | |
4701 | | - | |
4702 | | - | |
4703 | | - | |
| 4695 | + | |
4704 | 4696 | | |
4705 | 4697 | | |
4706 | 4698 | | |
4707 | 4699 | | |
4708 | 4700 | | |
4709 | | - | |
4710 | | - | |
4711 | | - | |
4712 | 4701 | | |
4713 | 4702 | | |
4714 | 4703 | | |
4715 | | - | |
4716 | 4704 | | |
4717 | 4705 | | |
4718 | 4706 | | |
| 4707 | + | |
4719 | 4708 | | |
| 4709 | + | |
4720 | 4710 | | |
4721 | 4711 | | |
4722 | 4712 | | |
4723 | 4713 | | |
4724 | 4714 | | |
4725 | 4715 | | |
4726 | | - | |
4727 | | - | |
4728 | 4716 | | |
4729 | 4717 | | |
4730 | 4718 | | |
| |||
0 commit comments