Bluetooth: sco: prevent information leak in sco_conn_defer_accept()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 25 Jun 2021 15:00:09 +0000 (18:00 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Sep 2021 07:50:34 +0000 (09:50 +0200)
commitdef6efdf91e72c04d5b12158a6a9cfc46bba8573
tree612fa01614b0bdc8e2588598c6f811c4742a7e8a
parente9a62740876b286cae4ceb0de4d1d1a04b1e6b0c
Bluetooth: sco: prevent information leak in sco_conn_defer_accept()

[ Upstream commit 59da0b38bc2ea570ede23a3332ecb3e7574ce6b2 ]

Smatch complains that some of these struct members are not initialized
leading to a stack information disclosure:

    net/bluetooth/sco.c:778 sco_conn_defer_accept() warn:
    check that 'cp.retrans_effort' doesn't leak information

This seems like a valid warning.  I've added a default case to fix
this issue.

Fixes: 2f69a82acf6f ("Bluetooth: Use voice setting in deferred SCO connection request")
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/sco.c