]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Bluetooth: hci_event: Detect if HCI_EV_NUM_COMP_PKTS is unbalanced
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 20 Aug 2025 21:04:00 +0000 (17:04 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Sep 2025 12:05:54 +0000 (14:05 +0200)
commitdc205c0883a298367ac25ca972046678145ab188
tree7f0e078b70f8f07b5ee70f11d0d26e9376a517f1
parent935ea874688484c7b5fed65cf04dff4dbd25907d
Bluetooth: hci_event: Detect if HCI_EV_NUM_COMP_PKTS is unbalanced

[ Upstream commit 15bf2c6391bafb14a3020d06ec0761bce0803463 ]

This attempts to detect if HCI_EV_NUM_COMP_PKTS contain an unbalanced
(more than currently considered outstanding) number of packets otherwise
it could cause the hcon->sent to underflow and loop around breaking the
tracking of the outstanding packets pending acknowledgment.

Fixes: f42809185896 ("Bluetooth: Simplify num_comp_pkts_evt function")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bluetooth/hci_event.c