Patch "Bluetooth: mgmt: Fix the command returns garbage parameter value" has been added to the 5.10-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: mgmt: Fix the command returns garbage parameter value

to the 5.10-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-mgmt-fix-the-command-returns-garbage-param.patch
and it can be found in the queue-5.10 subdirectory.

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



commit ceed3361a0cf10fcd09c28575891feb57a3ad718
Author: Tedd Ho-Jeong An <tedd.an@xxxxxxxxx>
Date:   Wed May 26 10:36:22 2021 -0700

    Bluetooth: mgmt: Fix the command returns garbage parameter value
    
    [ Upstream commit 02ce2c2c24024aade65a8d91d6a596651eaf2d0a ]
    
    When the Get Device Flags command fails, it returns the error status
    with the parameters filled with the garbage values. Although the
    parameters are not used, it is better to fill with zero than the random
    values.
    
    Signed-off-by: Tedd Ho-Jeong An <tedd.an@xxxxxxxxx>
    Signed-off-by: Marcel Holtmann <marcel@xxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 7dfb96946220..31a585fe0c7c 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -4038,6 +4038,8 @@ static int get_device_flags(struct sock *sk, struct hci_dev *hdev, void *data,
 
 	hci_dev_lock(hdev);
 
+	memset(&rp, 0, sizeof(rp));
+
 	if (cp->addr.type == BDADDR_BREDR) {
 		br_params = hci_bdaddr_list_lookup_with_flags(&hdev->whitelist,
 							      &cp->addr.bdaddr,



[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