linux/net/bluetooth/cmtp
Colin Ian King 5014a8453f Bluetooth: increase BTNAMSIZ to 21 chars to fix potential buffer overflow
[ Upstream commit 713baf3dae ]

An earlier commit replaced using batostr to using %pMR sprintf for the
construction of session->name. Static analysis detected that this new
method can use a total of 21 characters (including the trailing '\0')
so we need to increase the BTNAMSIZ from 18 to 21 to fix potential
buffer overflows.

Addresses-Coverity: ("Out-of-bounds write")
Fixes: fcb73338ed ("Bluetooth: Use %pMR in sprintf/seq_printf instead of batostr")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-15 09:50:37 +02:00
..
capi.c isdn: replace ->proc_fops with ->proc_show 2018-05-16 07:24:30 +02:00
cmtp.h Bluetooth: increase BTNAMSIZ to 21 chars to fix potential buffer overflow 2021-09-15 09:50:37 +02:00
core.c Bluetooth: cmtp: fix file refcount when cmtp_attach_device fails 2021-06-03 09:00:35 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
sock.c net: make ->{get,set}sockopt in proto_ops optional 2020-07-19 18:16:41 -07:00