]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
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)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 15 Oct 2021 09:26:50 +0000 (11:26 +0200)
commit40e0f5955c3f1dde33574853a9c9986edba53429
treedc71d2ef0c585893ed2921b1abd1c7a51bfaad76
parent8656ecb696cd84d68329c5d0952d1a449460296c
Bluetooth: sco: prevent information leak in sco_conn_defer_accept()

BugLink: https://bugs.launchpad.net/bugs/1946788
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
net/bluetooth/sco.c