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, 22 Sep 2021 09:43:00 +0000 (11:43 +0200)
commitfd3fd1a4e692860a0055384afb6f130c99d1a686
treea26ef54a43ff23b121a6d4279a172bdc7af5cb96
parentad611c0902fdcc834f4eb006e3d1cea1195dc40a
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