-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zephyr-kernel/3.1: update to latest commit
Recent commits have CVE-2022-2741 fixed. Also backported CVE-2022-2993 fix. Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
- Loading branch information
Showing
2 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
...l/zephyr-kernel/files/0001-3.1-Bluetooth-host-Fix-SMP-local-keys-check-when-startin.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
From 74d26b70f080a5dc60c6a1aa2bfec38043ee30d4 Mon Sep 17 00:00:00 2001 | ||
From: Joakim Andersson <joakim.andersson@nordicsemi.no> | ||
Date: Fri, 5 Aug 2022 10:50:47 +0200 | ||
Subject: [PATCH] Bluetooth: host: Fix SMP local keys check when starting | ||
encryption | ||
|
||
Fix SMP check of existing local keys when attempting to start security | ||
with required security mode 1 level 4. The logic for checking the | ||
conditions was wrong, leading to a situation where encryption would be | ||
attempted to be started by the central instead of initiating a new | ||
pairing procedure. This would fail when the connection was encrypted and | ||
the connection would be disconnected. | ||
|
||
Upstream-Status: Backport [https://github.com/zephyrproject-rtos/zephyr/commit/83d5402fe830973f943bde085d80f0d3643e811a] | ||
https://github.com/zephyrproject-rtos/zephyr/pull/52947/files | ||
CVE: CVE-2022-2993 | ||
|
||
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no> | ||
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
--- | ||
subsys/bluetooth/host/smp.c | 10 +++++----- | ||
1 file changed, 5 insertions(+), 5 deletions(-) | ||
|
||
diff --git a/subsys/bluetooth/host/smp.c b/subsys/bluetooth/host/smp.c | ||
index 02a847f97d..555f09fefd 100644 | ||
--- a/subsys/bluetooth/host/smp.c | ||
+++ b/subsys/bluetooth/host/smp.c | ||
@@ -357,15 +357,15 @@ static bool smp_keys_check(struct bt_conn *conn) | ||
return false; | ||
} | ||
|
||
- if (conn->required_sec_level > BT_SECURITY_L2 && | ||
+ if (conn->required_sec_level >= BT_SECURITY_L3 && | ||
!(conn->le.keys->flags & BT_KEYS_AUTHENTICATED)) { | ||
return false; | ||
} | ||
|
||
- if (conn->required_sec_level > BT_SECURITY_L3 && | ||
- !(conn->le.keys->flags & BT_KEYS_AUTHENTICATED) && | ||
- !(conn->le.keys->keys & BT_KEYS_LTK_P256) && | ||
- !(conn->le.keys->enc_size == BT_SMP_MAX_ENC_KEY_SIZE)) { | ||
+ if (conn->required_sec_level >= BT_SECURITY_L4 && | ||
+ !((conn->le.keys->flags & BT_KEYS_AUTHENTICATED) && | ||
+ (conn->le.keys->keys & BT_KEYS_LTK_P256) && | ||
+ (conn->le.keys->enc_size == BT_SMP_MAX_ENC_KEY_SIZE))) { | ||
return false; | ||
} | ||
|
||
-- | ||
2.25.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters