* [PATCH v4.4/bluetooth 1/2] Bluetooth: Consolidate encryption handling in hci_encrypt_cfm
@ 2020-10-15 7:43 Hans-Christian Noren Egtvedt
2020-10-15 7:43 ` [PATCH v4.4/bluetooth 2/2] Bluetooth: Disconnect if E0 is used for Level 4 Hans-Christian Noren Egtvedt
2020-10-15 9:57 ` [PATCH v4.4/bluetooth 1/2] Bluetooth: Consolidate encryption handling in hci_encrypt_cfm Greg KH
0 siblings, 2 replies; 8+ messages in thread
From: Hans-Christian Noren Egtvedt @ 2020-10-15 7:43 UTC (permalink / raw)
To: linux-kernel; +Cc: gregkh, Luiz Augusto von Dentz, Marcel Holtmann
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection
state is BT_CONFIG so callers don't have to check the state.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
(cherry picked from commit 3ca44c16b0dcc764b641ee4ac226909f5c421aa3)
(cherry picked from commit 0a60996c7fa7010ea00d9b62fb6996d908a01ead)
---
AFAICT, fixing CVE 2020-10135 Bluetooth impersonation attacks have been
left out for the 4.4 stable kernel. I cherry picked what I assume are
the appropriate two patches missing from the 4.9 stable kernel. Please
add them to upcoming 4.4 stable releases.
include/net/bluetooth/hci_core.h | 20 ++++++++++++++++++--
net/bluetooth/hci_event.c | 28 +++-------------------------
2 files changed, 21 insertions(+), 27 deletions(-)
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 7c0c83dfe86e..0269a772bfe1 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -1235,10 +1235,26 @@ static inline void hci_auth_cfm(struct hci_conn *conn, __u8 status)
conn->security_cfm_cb(conn, status);
}
-static inline void hci_encrypt_cfm(struct hci_conn *conn, __u8 status,
- __u8 encrypt)
+static inline void hci_encrypt_cfm(struct hci_conn *conn, __u8 status)
{
struct hci_cb *cb;
+ __u8 encrypt;
+
+ if (conn->state == BT_CONFIG) {
+ if (status)
+ conn->state = BT_CONNECTED;
+
+ hci_connect_cfm(conn, status);
+ hci_conn_drop(conn);
+ return;
+ }
+
+ if (!test_bit(HCI_CONN_ENCRYPT, &conn->flags))
+ encrypt = 0x00;
+ else if (test_bit(HCI_CONN_AES_CCM, &conn->flags))
+ encrypt = 0x02;
+ else
+ encrypt = 0x01;
if (conn->sec_level == BT_SECURITY_SDP)
conn->sec_level = BT_SECURITY_LOW;
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 03319ab8a7c6..bb9c13506bca 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -2479,7 +2479,7 @@ static void hci_auth_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
&cp);
} else {
clear_bit(HCI_CONN_ENCRYPT_PEND, &conn->flags);
- hci_encrypt_cfm(conn, ev->status, 0x00);
+ hci_encrypt_cfm(conn, ev->status);
}
}
@@ -2565,22 +2565,7 @@ static void read_enc_key_size_complete(struct hci_dev *hdev, u8 status,
conn->enc_key_size = rp->key_size;
}
- if (conn->state == BT_CONFIG) {
- conn->state = BT_CONNECTED;
- hci_connect_cfm(conn, 0);
- hci_conn_drop(conn);
- } else {
- u8 encrypt;
-
- if (!test_bit(HCI_CONN_ENCRYPT, &conn->flags))
- encrypt = 0x00;
- else if (test_bit(HCI_CONN_AES_CCM, &conn->flags))
- encrypt = 0x02;
- else
- encrypt = 0x01;
-
- hci_encrypt_cfm(conn, 0, encrypt);
- }
+ hci_encrypt_cfm(conn, 0);
unlock:
hci_dev_unlock(hdev);
@@ -2674,14 +2659,7 @@ static void hci_encrypt_change_evt(struct hci_dev *hdev, struct sk_buff *skb)
}
notify:
- if (conn->state == BT_CONFIG) {
- if (!ev->status)
- conn->state = BT_CONNECTED;
-
- hci_connect_cfm(conn, ev->status);
- hci_conn_drop(conn);
- } else
- hci_encrypt_cfm(conn, ev->status, ev->encrypt);
+ hci_encrypt_cfm(conn, ev->status);
unlock:
hci_dev_unlock(hdev);
--
2.27.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v4.4/bluetooth 2/2] Bluetooth: Disconnect if E0 is used for Level 4
2020-10-15 7:43 [PATCH v4.4/bluetooth 1/2] Bluetooth: Consolidate encryption handling in hci_encrypt_cfm Hans-Christian Noren Egtvedt
@ 2020-10-15 7:43 ` Hans-Christian Noren Egtvedt
2020-10-15 9:58 ` Greg KH
2020-10-15 9:57 ` [PATCH v4.4/bluetooth 1/2] Bluetooth: Consolidate encryption handling in hci_encrypt_cfm Greg KH
1 sibling, 1 reply; 8+ messages in thread
From: Hans-Christian Noren Egtvedt @ 2020-10-15 7:43 UTC (permalink / raw)
To: linux-kernel; +Cc: gregkh, Luiz Augusto von Dentz, Marcel Holtmann
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
E0 is not allowed with Level 4:
BLUETOOTH CORE SPECIFICATION Version 5.2 | Vol 3, Part C page 1319:
'128-bit equivalent strength for link and encryption keys
required using FIPS approved algorithms (E0 not allowed,
SAFER+ not allowed, and P-192 not allowed; encryption key
not shortened'
SC enabled:
> HCI Event: Read Remote Extended Features (0x23) plen 13
Status: Success (0x00)
Handle: 256
Page: 1/2
Features: 0x0b 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Secure Simple Pairing (Host Support)
LE Supported (Host)
Secure Connections (Host Support)
> HCI Event: Encryption Change (0x08) plen 4
Status: Success (0x00)
Handle: 256
Encryption: Enabled with AES-CCM (0x02)
SC disabled:
> HCI Event: Read Remote Extended Features (0x23) plen 13
Status: Success (0x00)
Handle: 256
Page: 1/2
Features: 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Secure Simple Pairing (Host Support)
LE Supported (Host)
> HCI Event: Encryption Change (0x08) plen 4
Status: Success (0x00)
Handle: 256
Encryption: Enabled with E0 (0x01)
[May 8 20:23] Bluetooth: hci0: Invalid security: expect AES but E0 was used
< HCI Command: Disconnect (0x01|0x0006) plen 3
Handle: 256
Reason: Authentication Failure (0x05)
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
(cherry picked from commit 8746f135bb01872ff412d408ea1aa9ebd328c1f5)
(cherry picked from commit f263237a1709a6dbf1dc9945187f1e64c53a4b73)
---
AFAICT, fixing CVE 2020-10135 Bluetooth impersonation attacks have been
left out for the 4.4 stable kernel. I cherry picked what I assume are
the appropriate two patches missing from the 4.9 stable kernel. Please
add them to upcoming 4.4 stable releases.
include/net/bluetooth/hci_core.h | 10 ++++++----
net/bluetooth/hci_conn.c | 17 +++++++++++++++++
net/bluetooth/hci_event.c | 20 ++++++++------------
3 files changed, 31 insertions(+), 16 deletions(-)
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 0269a772bfe1..d07730be8d5a 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -1256,11 +1256,13 @@ static inline void hci_encrypt_cfm(struct hci_conn *conn, __u8 status)
else
encrypt = 0x01;
- if (conn->sec_level == BT_SECURITY_SDP)
- conn->sec_level = BT_SECURITY_LOW;
+ if (!status) {
+ if (conn->sec_level == BT_SECURITY_SDP)
+ conn->sec_level = BT_SECURITY_LOW;
- if (conn->pending_sec_level > conn->sec_level)
- conn->sec_level = conn->pending_sec_level;
+ if (conn->pending_sec_level > conn->sec_level)
+ conn->sec_level = conn->pending_sec_level;
+ }
mutex_lock(&hci_cb_list_lock);
list_for_each_entry(cb, &hci_cb_list, list) {
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 2ff5950e9712..2567249b5bce 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -1175,6 +1175,23 @@ int hci_conn_check_link_mode(struct hci_conn *conn)
return 0;
}
+ /* AES encryption is required for Level 4:
+ *
+ * BLUETOOTH CORE SPECIFICATION Version 5.2 | Vol 3, Part C
+ * page 1319:
+ *
+ * 128-bit equivalent strength for link and encryption keys
+ * required using FIPS approved algorithms (E0 not allowed,
+ * SAFER+ not allowed, and P-192 not allowed; encryption key
+ * not shortened)
+ */
+ if (conn->sec_level == BT_SECURITY_FIPS &&
+ !test_bit(HCI_CONN_AES_CCM, &conn->flags)) {
+ bt_dev_err(conn->hdev,
+ "Invalid security: Missing AES-CCM usage");
+ return 0;
+ }
+
if (hci_conn_ssp_enabled(conn) &&
!test_bit(HCI_CONN_ENCRYPT, &conn->flags))
return 0;
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index bb9c13506bca..f0e6cce921d8 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -2612,24 +2612,20 @@ static void hci_encrypt_change_evt(struct hci_dev *hdev, struct sk_buff *skb)
clear_bit(HCI_CONN_ENCRYPT_PEND, &conn->flags);
+ /* Check link security requirements are met */
+ if (!hci_conn_check_link_mode(conn))
+ ev->status = HCI_ERROR_AUTH_FAILURE;
+
if (ev->status && conn->state == BT_CONNECTED) {
+ /* Notify upper layers so they can cleanup before
+ * disconnecting.
+ */
+ hci_encrypt_cfm(conn, ev->status);
hci_disconnect(conn, HCI_ERROR_AUTH_FAILURE);
hci_conn_drop(conn);
goto unlock;
}
- /* In Secure Connections Only mode, do not allow any connections
- * that are not encrypted with AES-CCM using a P-256 authenticated
- * combination key.
- */
- if (hci_dev_test_flag(hdev, HCI_SC_ONLY) &&
- (!test_bit(HCI_CONN_AES_CCM, &conn->flags) ||
- conn->key_type != HCI_LK_AUTH_COMBINATION_P256)) {
- hci_connect_cfm(conn, HCI_ERROR_AUTH_FAILURE);
- hci_conn_drop(conn);
- goto unlock;
- }
-
/* Try reading the encryption key size for encrypted ACL links */
if (!ev->status && ev->encrypt && conn->type == ACL_LINK) {
struct hci_cp_read_enc_key_size cp;
--
2.27.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v4.4/bluetooth 1/2] Bluetooth: Consolidate encryption handling in hci_encrypt_cfm
2020-10-15 7:43 [PATCH v4.4/bluetooth 1/2] Bluetooth: Consolidate encryption handling in hci_encrypt_cfm Hans-Christian Noren Egtvedt
2020-10-15 7:43 ` [PATCH v4.4/bluetooth 2/2] Bluetooth: Disconnect if E0 is used for Level 4 Hans-Christian Noren Egtvedt
@ 2020-10-15 9:57 ` Greg KH
2020-10-15 11:18 ` Hans-Christian Egtvedt (hegtvedt)
1 sibling, 1 reply; 8+ messages in thread
From: Greg KH @ 2020-10-15 9:57 UTC (permalink / raw)
To: Hans-Christian Noren Egtvedt
Cc: linux-kernel, Luiz Augusto von Dentz, Marcel Holtmann
On Thu, Oct 15, 2020 at 09:43:32AM +0200, Hans-Christian Noren Egtvedt wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection
> state is BT_CONFIG so callers don't have to check the state.
>
> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
> (cherry picked from commit 3ca44c16b0dcc764b641ee4ac226909f5c421aa3)
This is only in 5.8, what about all the other stable kernels?
> (cherry picked from commit 0a60996c7fa7010ea00d9b62fb6996d908a01ead)
Where is this commit from? I don't see it in Linus's tree.
> ---
> AFAICT, fixing CVE 2020-10135 Bluetooth impersonation attacks have been
> left out for the 4.4 stable kernel. I cherry picked what I assume are
> the appropriate two patches missing from the 4.9 stable kernel. Please
> add them to upcoming 4.4 stable releases.
Why are you merging 2 commits together? Please provide backports for
all stable kernels, if you want to see this in the 4.4.y tree. We can
not have someone move from an older tree to a newer one and have a
regression.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v4.4/bluetooth 2/2] Bluetooth: Disconnect if E0 is used for Level 4
2020-10-15 7:43 ` [PATCH v4.4/bluetooth 2/2] Bluetooth: Disconnect if E0 is used for Level 4 Hans-Christian Noren Egtvedt
@ 2020-10-15 9:58 ` Greg KH
0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2020-10-15 9:58 UTC (permalink / raw)
To: Hans-Christian Noren Egtvedt
Cc: linux-kernel, Luiz Augusto von Dentz, Marcel Holtmann
On Thu, Oct 15, 2020 at 09:43:33AM +0200, Hans-Christian Noren Egtvedt wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> E0 is not allowed with Level 4:
>
> BLUETOOTH CORE SPECIFICATION Version 5.2 | Vol 3, Part C page 1319:
>
> '128-bit equivalent strength for link and encryption keys
> required using FIPS approved algorithms (E0 not allowed,
> SAFER+ not allowed, and P-192 not allowed; encryption key
> not shortened'
>
> SC enabled:
>
> > HCI Event: Read Remote Extended Features (0x23) plen 13
> Status: Success (0x00)
> Handle: 256
> Page: 1/2
> Features: 0x0b 0x00 0x00 0x00 0x00 0x00 0x00 0x00
> Secure Simple Pairing (Host Support)
> LE Supported (Host)
> Secure Connections (Host Support)
> > HCI Event: Encryption Change (0x08) plen 4
> Status: Success (0x00)
> Handle: 256
> Encryption: Enabled with AES-CCM (0x02)
>
> SC disabled:
>
> > HCI Event: Read Remote Extended Features (0x23) plen 13
> Status: Success (0x00)
> Handle: 256
> Page: 1/2
> Features: 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00
> Secure Simple Pairing (Host Support)
> LE Supported (Host)
> > HCI Event: Encryption Change (0x08) plen 4
> Status: Success (0x00)
> Handle: 256
> Encryption: Enabled with E0 (0x01)
> [May 8 20:23] Bluetooth: hci0: Invalid security: expect AES but E0 was used
> < HCI Command: Disconnect (0x01|0x0006) plen 3
> Handle: 256
> Reason: Authentication Failure (0x05)
>
> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
> (cherry picked from commit 8746f135bb01872ff412d408ea1aa9ebd328c1f5)
> (cherry picked from commit f263237a1709a6dbf1dc9945187f1e64c53a4b73)
I do not see this commit in Linus's tree.
> ---
> AFAICT, fixing CVE 2020-10135 Bluetooth impersonation attacks have been
> left out for the 4.4 stable kernel. I cherry picked what I assume are
> the appropriate two patches missing from the 4.9 stable kernel. Please
> add them to upcoming 4.4 stable releases.
Same thing as before, we need this in all kernels.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v4.4/bluetooth 1/2] Bluetooth: Consolidate encryption handling in hci_encrypt_cfm
2020-10-15 9:57 ` [PATCH v4.4/bluetooth 1/2] Bluetooth: Consolidate encryption handling in hci_encrypt_cfm Greg KH
@ 2020-10-15 11:18 ` Hans-Christian Egtvedt (hegtvedt)
2020-10-15 12:02 ` Greg KH
0 siblings, 1 reply; 8+ messages in thread
From: Hans-Christian Egtvedt (hegtvedt) @ 2020-10-15 11:18 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel, Luiz Augusto von Dentz, Marcel Holtmann
[-- Attachment #1: Type: text/plain, Size: 1836 bytes --]
On 15/10/2020 11:57, Greg KH wrote:
> On Thu, Oct 15, 2020 at 09:43:32AM +0200, Hans-Christian Noren Egtvedt wrote:
>> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>>
>> This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection
>> state is BT_CONFIG so callers don't have to check the state.
>>
>> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
>> (cherry picked from commit 3ca44c16b0dcc764b641ee4ac226909f5c421aa3)
>
> This is only in 5.8, what about all the other stable kernels?
>
>> (cherry picked from commit 0a60996c7fa7010ea00d9b62fb6996d908a01ead)
>
> Where is this commit from? I don't see it in Linus's tree.
Ops, my bad, I have a Linux 4.9 branch, which also includes the Android
4.9 kernel changes from Google. And since I noticed the patches in my
(merged from Android latest) linux-4.9.y branch, I thought the patches
were applied through all stable releases 4.9 and up.
>> ---
>> AFAICT, fixing CVE 2020-10135 Bluetooth impersonation attacks have been
>> left out for the 4.4 stable kernel. I cherry picked what I assume are
>> the appropriate two patches missing from the 4.9 stable kernel. Please
>> add them to upcoming 4.4 stable releases.
>
> Why are you merging 2 commits together? Please provide backports for
> all stable kernels, if you want to see this in the 4.4.y tree. We can
> not have someone move from an older tree to a newer one and have a
> regression.
Agreed, I have managed to trick myself into thinking the 4.4.y branch
was left out, but I assume these patches are required for all LTS branches.
That is a bigger job AFAIK, the newer branches might need additional
patches. Perhaps Luiz can assist?
--
Best regards, Hans-Christian Noren Egtvedt
[-- Attachment #2: pEpkey.asc --]
[-- Type: application/pgp-keys, Size: 1813 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v4.4/bluetooth 1/2] Bluetooth: Consolidate encryption handling in hci_encrypt_cfm
2020-10-15 11:18 ` Hans-Christian Egtvedt (hegtvedt)
@ 2020-10-15 12:02 ` Greg KH
2020-10-15 12:44 ` Hans-Christian Egtvedt (hegtvedt)
0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2020-10-15 12:02 UTC (permalink / raw)
To: Hans-Christian Egtvedt (hegtvedt)
Cc: linux-kernel, Luiz Augusto von Dentz, Marcel Holtmann
On Thu, Oct 15, 2020 at 11:18:39AM +0000, Hans-Christian Egtvedt (hegtvedt) wrote:
> On 15/10/2020 11:57, Greg KH wrote:
> > On Thu, Oct 15, 2020 at 09:43:32AM +0200, Hans-Christian Noren Egtvedt wrote:
> >> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> >>
> >> This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection
> >> state is BT_CONFIG so callers don't have to check the state.
> >>
> >> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> >> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
> >> (cherry picked from commit 3ca44c16b0dcc764b641ee4ac226909f5c421aa3)
> >
> > This is only in 5.8, what about all the other stable kernels?
> >
> >> (cherry picked from commit 0a60996c7fa7010ea00d9b62fb6996d908a01ead)
> >
> > Where is this commit from? I don't see it in Linus's tree.
>
> Ops, my bad, I have a Linux 4.9 branch, which also includes the Android
> 4.9 kernel changes from Google. And since I noticed the patches in my
> (merged from Android latest) linux-4.9.y branch, I thought the patches
> were applied through all stable releases 4.9 and up.
I just looked at the google common android trees, and do not see this
commit in the android-4.9-q branch. What branch are you seeing it in?
> >> ---
> >> AFAICT, fixing CVE 2020-10135 Bluetooth impersonation attacks have been
> >> left out for the 4.4 stable kernel. I cherry picked what I assume are
> >> the appropriate two patches missing from the 4.9 stable kernel. Please
> >> add them to upcoming 4.4 stable releases.
> >
> > Why are you merging 2 commits together? Please provide backports for
> > all stable kernels, if you want to see this in the 4.4.y tree. We can
> > not have someone move from an older tree to a newer one and have a
> > regression.
>
> Agreed, I have managed to trick myself into thinking the 4.4.y branch
> was left out, but I assume these patches are required for all LTS branches.
They are, but if you have copies of them, please feel free to share
them.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v4.4/bluetooth 1/2] Bluetooth: Consolidate encryption handling in hci_encrypt_cfm
2020-10-15 12:02 ` Greg KH
@ 2020-10-15 12:44 ` Hans-Christian Egtvedt (hegtvedt)
2020-10-15 21:15 ` Hans-Christian Egtvedt (hegtvedt)
0 siblings, 1 reply; 8+ messages in thread
From: Hans-Christian Egtvedt (hegtvedt) @ 2020-10-15 12:44 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel, Luiz Augusto von Dentz, Marcel Holtmann
[-- Attachment #1: Type: text/plain, Size: 2609 bytes --]
On 15/10/2020 14:02, Greg KH wrote:
> On Thu, Oct 15, 2020 at 11:18:39AM +0000, Hans-Christian Egtvedt (hegtvedt) wrote:
>> On 15/10/2020 11:57, Greg KH wrote:
>>> On Thu, Oct 15, 2020 at 09:43:32AM +0200, Hans-Christian Noren Egtvedt wrote:
>>>> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>>>>
>>>> This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection
>>>> state is BT_CONFIG so callers don't have to check the state.
>>>>
>>>> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>>>> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
>>>> (cherry picked from commit 3ca44c16b0dcc764b641ee4ac226909f5c421aa3)
>>>
>>> This is only in 5.8, what about all the other stable kernels?
>>>
>>>> (cherry picked from commit 0a60996c7fa7010ea00d9b62fb6996d908a01ead)
>>>
>>> Where is this commit from? I don't see it in Linus's tree.
>>
>> Ops, my bad, I have a Linux 4.9 branch, which also includes the Android
>> 4.9 kernel changes from Google. And since I noticed the patches in my
>> (merged from Android latest) linux-4.9.y branch, I thought the patches
>> were applied through all stable releases 4.9 and up.
>
> I just looked at the google common android trees, and do not see this
> commit in the android-4.9-q branch. What branch are you seeing it in?
Well this is embarrassing:
commit 0a60996c7fa7010ea00d9b62fb6996d908a01ead
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Commit: Hans-Christian Noren Egtvedt <hegtvedt@cisco.com>
>>>> ---
>>>> AFAICT, fixing CVE 2020-10135 Bluetooth impersonation attacks have been
>>>> left out for the 4.4 stable kernel. I cherry picked what I assume are
>>>> the appropriate two patches missing from the 4.9 stable kernel. Please
>>>> add them to upcoming 4.4 stable releases.
>>>
>>> Why are you merging 2 commits together? Please provide backports for
>>> all stable kernels, if you want to see this in the 4.4.y tree. We can
>>> not have someone move from an older tree to a newer one and have a
>>> regression.
>>
>> Agreed, I have managed to trick myself into thinking the 4.4.y branch
>> was left out, but I assume these patches are required for all LTS branches.
>
> They are, but if you have copies of them, please feel free to share
> them.
I will repeat cherry-picking from a clean linux-stable git tree and send
patches, sorry for this noise.
I see linux-5.8.y has partial patches, while the older branches need the
full series of three commits. I just discovered an additional fix.
--
Best regards, Hans-Christian Noren Egtvedt
[-- Attachment #2: pEpkey.asc --]
[-- Type: application/pgp-keys, Size: 1813 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v4.4/bluetooth 1/2] Bluetooth: Consolidate encryption handling in hci_encrypt_cfm
2020-10-15 12:44 ` Hans-Christian Egtvedt (hegtvedt)
@ 2020-10-15 21:15 ` Hans-Christian Egtvedt (hegtvedt)
0 siblings, 0 replies; 8+ messages in thread
From: Hans-Christian Egtvedt (hegtvedt) @ 2020-10-15 21:15 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel, Luiz Augusto von Dentz, Marcel Holtmann
[-- Attachment #1: Type: text/plain, Size: 1865 bytes --]
On 15/10/2020 14:44, Hans-Christian Egtvedt (hegtvedt) wrote:
> On 15/10/2020 14:02, Greg KH wrote:
>> On Thu, Oct 15, 2020 at 11:18:39AM +0000, Hans-Christian Egtvedt (hegtvedt) wrote:
>>> On 15/10/2020 11:57, Greg KH wrote:
>>>> On Thu, Oct 15, 2020 at 09:43:32AM +0200, Hans-Christian Noren Egtvedt wrote:
>>>>> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
<snipp embarrassing reference to local commit>
>>>>> ---
>>>>> AFAICT, fixing CVE 2020-10135 Bluetooth impersonation attacks have been
>>>>> left out for the 4.4 stable kernel. I cherry picked what I assume are
>>>>> the appropriate two patches missing from the 4.9 stable kernel. Please
>>>>> add them to upcoming 4.4 stable releases.
>>>>
>>>> Why are you merging 2 commits together? Please provide backports for
>>>> all stable kernels, if you want to see this in the 4.4.y tree. We can
>>>> not have someone move from an older tree to a newer one and have a
>>>> regression.
>>>
>>> Agreed, I have managed to trick myself into thinking the 4.4.y branch
>>> was left out, but I assume these patches are required for all LTS branches.
>>
>> They are, but if you have copies of them, please feel free to share
>> them.
>
> I will repeat cherry-picking from a clean linux-stable git tree and send
> patches, sorry for this noise.
>
> I see linux-5.8.y has partial patches, while the older branches need the
> full series of three commits. I just discovered an additional fix.
I sent three iterations.
5.8.y only requires a single cherry-pick.
4.9.y to 5.4.y has non-conflicting cherry-pick from upstream commits.
4.4.y needs to resolve a conflict when cherry-picking.
I would still want Luiz to ack that this completes the mitigation for
this Bluetooth vulnerability in the stable kernels.
--
Best regards, Hans-Christian Noren Egtvedt
[-- Attachment #2: pEpkey.asc --]
[-- Type: application/pgp-keys, Size: 1813 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-10-15 21:15 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-15 7:43 [PATCH v4.4/bluetooth 1/2] Bluetooth: Consolidate encryption handling in hci_encrypt_cfm Hans-Christian Noren Egtvedt
2020-10-15 7:43 ` [PATCH v4.4/bluetooth 2/2] Bluetooth: Disconnect if E0 is used for Level 4 Hans-Christian Noren Egtvedt
2020-10-15 9:58 ` Greg KH
2020-10-15 9:57 ` [PATCH v4.4/bluetooth 1/2] Bluetooth: Consolidate encryption handling in hci_encrypt_cfm Greg KH
2020-10-15 11:18 ` Hans-Christian Egtvedt (hegtvedt)
2020-10-15 12:02 ` Greg KH
2020-10-15 12:44 ` Hans-Christian Egtvedt (hegtvedt)
2020-10-15 21:15 ` Hans-Christian Egtvedt (hegtvedt)
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.