From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.7 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21ACAC31E45 for ; Thu, 13 Jun 2019 15:55:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E176F208CA for ; Thu, 13 Jun 2019 15:55:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560441356; bh=e12xH+UmhDSQmVu0wlMCeN9EoyGK+UZJOaudMdluF+k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=b0gBQfE3oBU27XoHr74f5UMDlkrOesVgNBEQPTp4eH0ZzqUS1nxZMiMyx570nWrXh i+FWYgDNQF3jJYz/G2jDQPuF2utwcnZST5oN+88Hm5s5Jvev62wHSj8VzjSkKMefi3 YHJpA9RHzAFZi1ybpxGYXyfEpnIIyqYj7lCSPJDk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390263AbfFMPzy (ORCPT ); Thu, 13 Jun 2019 11:55:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:38962 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731533AbfFMIvc (ORCPT ); Thu, 13 Jun 2019 04:51:32 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 22D0D21473; Thu, 13 Jun 2019 08:51:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560415891; bh=e12xH+UmhDSQmVu0wlMCeN9EoyGK+UZJOaudMdluF+k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xIa77YgmdzcNSuIQEnbRHlvvzasX7mSm8t2bqraK5AD/VK0b67X3AoY02OTLzWTtE 9dw+xkp0pcRcoyU9+onRw1HKkKLrrpj75Xlxwt1FjPfio/SnsHyYuTMlqa+ClX0pfD SI3fbCmFBEj3GK12bf421/HOnRn3m7aTLZSPse2g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vasily Khoruzhick , Hans de Goede , Jeremy Cline , Marcel Holtmann , Johan Hedberg Subject: [PATCH 5.1 152/155] Revert "Bluetooth: Align minimum encryption key size for LE and BR/EDR connections" Date: Thu, 13 Jun 2019 10:34:24 +0200 Message-Id: <20190613075701.309484157@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190613075652.691765927@linuxfoundation.org> References: <20190613075652.691765927@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman This reverts commit 07e38998a19d72b916c39a983c19134522ae806b which is commit d5bb334a8e171b262e48f378bd2096c0ea458265 upstream. Lots of people have reported issues with this patch, and as there does not seem to be a fix going into Linus's kernel tree any time soon, revert the commit in the stable trees so as to get people's machines working properly again. Reported-by: Vasily Khoruzhick Reported-by: Hans de Goede Cc: Jeremy Cline Cc: Marcel Holtmann Cc: Johan Hedberg Signed-off-by: Greg Kroah-Hartman --- include/net/bluetooth/hci_core.h | 3 --- net/bluetooth/hci_conn.c | 8 -------- 2 files changed, 11 deletions(-) --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h @@ -190,9 +190,6 @@ struct adv_info { #define HCI_MAX_SHORT_NAME_LENGTH 10 -/* Min encryption key size to match with SMP */ -#define HCI_MIN_ENC_KEY_SIZE 7 - /* Default LE RPA expiry time, 15 minutes */ #define HCI_DEFAULT_RPA_TIMEOUT (15 * 60) --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -1276,14 +1276,6 @@ int hci_conn_check_link_mode(struct hci_ !test_bit(HCI_CONN_ENCRYPT, &conn->flags)) return 0; - /* The minimum encryption key size needs to be enforced by the - * host stack before establishing any L2CAP connections. The - * specification in theory allows a minimum of 1, but to align - * BR/EDR and LE transports, a minimum of 7 is chosen. - */ - if (conn->enc_key_size < HCI_MIN_ENC_KEY_SIZE) - return 0; - return 1; }