Patch "Bluetooth: sco: prevent information leak in sco_conn_defer_accept()" has been added to the 5.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    Bluetooth: sco: prevent information leak in sco_conn_defer_accept()

to the 5.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     bluetooth-sco-prevent-information-leak-in-sco_conn_d.patch
and it can be found in the queue-5.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 6b4899b83103b3374ef129da7d83edaa9132ffec
Author: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Date:   Fri Jun 25 18:00:09 2021 +0300

    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@xxxxxxxxxx>
    Signed-off-by: Marcel Holtmann <marcel@xxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index d9a4e88dacbb..ffa2a77a3e4c 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -773,6 +773,11 @@ static void sco_conn_defer_accept(struct hci_conn *conn, u16 setting)
 			cp.max_latency = cpu_to_le16(0xffff);
 			cp.retrans_effort = 0xff;
 			break;
+		default:
+			/* use CVSD settings as fallback */
+			cp.max_latency = cpu_to_le16(0xffff);
+			cp.retrans_effort = 0xff;
+			break;
 		}
 
 		hci_send_cmd(hdev, HCI_OP_ACCEPT_SYNC_CONN_REQ,



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux