Bluetooth: hci_bcsp: Fix memory leak in rx_skb
authorTomas Bortoli <tomasbortoli@gmail.com>
Tue, 28 May 2019 13:42:58 +0000 (15:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Aug 2019 07:33:24 +0000 (09:33 +0200)
commitfa729a351b7a5189ae00fff03852d9ecb79685cd
tree4de6dbf700e9443bebccf36b02900340f98fa3bb
parentd66de413dbf55ae276055f976fa139fc2bcbecde
Bluetooth: hci_bcsp: Fix memory leak in rx_skb

[ Upstream commit 4ce9146e0370fcd573f0372d9b4e5a211112567c ]

Syzkaller found that it is possible to provoke a memory leak by
never freeing rx_skb in struct bcsp_struct.

Fix by freeing in bcsp_close()

Signed-off-by: Tomas Bortoli <tomasbortoli@gmail.com>
Reported-by: syzbot+98162c885993b72f19c4@syzkaller.appspotmail.com
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/bluetooth/hci_bcsp.c