]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Bluetooth: Fix slab-out-of-bounds read in hci_le_direct_adv_report_evt()
authorPeilin Ye <yepeilin.cs@gmail.com>
Wed, 9 Sep 2020 07:17:00 +0000 (03:17 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:25:48 +0000 (11:25 +0100)
commit61490c481c61ff230da5f6042f353c6c0db0bc0c
treec0284ecba6d15a06af7e5b62a5d1cf19b164d9f2
parent7a3c3a1c67e00942ae4890281b5b56026650bed8
Bluetooth: Fix slab-out-of-bounds read in hci_le_direct_adv_report_evt()

commit f7e0e8b2f1b0a09b527885babda3e912ba820798 upstream.

`num_reports` is not being properly checked. A malformed event packet with
a large `num_reports` number makes hci_le_direct_adv_report_evt() read out
of bounds. Fix it.

Cc: stable@vger.kernel.org
Fixes: 2f010b55884e ("Bluetooth: Add support for handling LE Direct Advertising Report events")
Reported-and-tested-by: syzbot+24ebd650e20bd263ca01@syzkaller.appspotmail.com
Link: https://syzkaller.appspot.com/bug?extid=24ebd650e20bd263ca01
Signed-off-by: Peilin Ye <yepeilin.cs@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/bluetooth/hci_event.c