Bluetooth: L2CAP: uninitialized variables in l2cap_sock_setsockopt()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 7 Jan 2022 07:16:44 +0000 (10:16 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:03:58 +0000 (11:03 +0100)
commitabe4b2c214ea83a89716288956f88b85b33bd04f
treec667fd00d5a51a56895a57377baa89e651316a6b
parentb918c668d2954461eeaa8f2409e61bca92dcb324
Bluetooth: L2CAP: uninitialized variables in l2cap_sock_setsockopt()

[ Upstream commit 2b70d4f9b20635ac328836e50d183632e1930f94 ]

The "opt" variable is a u32, but on some paths only the top bytes
were initialized and the others contained random stack data.

Fixes: a7b75c5a8c41 ("net: pass a sockptr_t into ->setsockopt")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bluetooth/l2cap_sock.c