Re: FAILED: patch "[PATCH] Bluetooth: Fix properly ignoring LTKs of unknown types" failed to apply to 3.15-stable tree

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

 



Hi Greg,

The reason why this one is failing is that we forgot to add a Cc: stable
tag to another patch it depends on (or alternatively mark it as a
prerequisite to the original patch):

commit d7b2545023ecfde94d3ea9c03c5480ac18da96c9
Author: Johan Hedberg <johan.hedberg@xxxxxxxxx>
Date:   Fri May 23 13:19:53 2014 +0300

    Bluetooth: Clearly distinguish mgmt LTK type from authenticated property

The above commit id matches what's currently in Linus's tree. Is this
enough information or the whole patch needs to be sent to stable@vger?

Johan

On Fri, Jun 27, 2014, gregkh@xxxxxxxxxxxxxxxxxxx wrote:
> 
> The patch below does not apply to the 3.15-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@xxxxxxxxxxxxxxx>.
> 
> thanks,
> 
> greg k-h
> 
> ------------------ original commit in Linus's tree ------------------
> 
> From 61b433579b6ffecb1d3534fd482dcd48535277c8 Mon Sep 17 00:00:00 2001
> From: Johan Hedberg <johan.hedberg@xxxxxxxxx>
> Date: Thu, 29 May 2014 19:36:53 +0300
> Subject: [PATCH] Bluetooth: Fix properly ignoring LTKs of unknown types
> 
> In case there are new LTK types in the future we shouldn't just blindly
> assume that != MGMT_LTK_UNAUTHENTICATED means that the key is
> authenticated. This patch adds explicit checks for each allowed key type
> in the form of a switch statement and skips any key which has an unknown
> value.
> 
> Signed-off-by: Johan Hedberg <johan.hedberg@xxxxxxxxx>
> Signed-off-by: Marcel Holtmann <marcel@xxxxxxxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx
> 
> diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
> index 5e9c21a5525f..0fce54412ffd 100644
> --- a/net/bluetooth/mgmt.c
> +++ b/net/bluetooth/mgmt.c
> @@ -4546,10 +4546,16 @@ static int load_long_term_keys(struct sock *sk, struct hci_dev *hdev,
>  		else
>  			type = HCI_SMP_LTK_SLAVE;
>  
> -		if (key->type == MGMT_LTK_UNAUTHENTICATED)
> +		switch (key->type) {
> +		case MGMT_LTK_UNAUTHENTICATED:
>  			authenticated = 0x00;
> -		else
> +			break;
> +		case MGMT_LTK_AUTHENTICATED:
>  			authenticated = 0x01;
> +			break;
> +		default:
> +			continue;
> +		}
>  
>  		hci_add_ltk(hdev, &key->addr.bdaddr, addr_type, type,
>  			    authenticated, key->val, key->enc_size, key->ediv,
> 
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]