mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
Bluetooth: increase BTNAMSIZ to 21 chars to fix potential buffer overflow
[ Upstream commit713baf3dae
] 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>
This commit is contained in:
parent
afffa7b4c6
commit
5014a8453f
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@
|
|||
#include <linux/types.h>
|
||||
#include <net/bluetooth/bluetooth.h>
|
||||
|
||||
#define BTNAMSIZ 18
|
||||
#define BTNAMSIZ 21
|
||||
|
||||
/* CMTP ioctl defines */
|
||||
#define CMTPCONNADD _IOW('C', 200, int)
|
||||
|
|
Loading…
Reference in a new issue