diff options
| author | Chun-Yi Lee <jlee@suse.com> | 2026-11-11 17:45:18 +0800 |
|---|---|---|
| committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2026-11-11 14:52:22 -0500 |
| commit | fd038b82c71baa8dfb80e1781e53c0dbbda84e70 (patch) | |
| tree | 85676f03f15f05f80090e032cbc3ff74a7088bdc /tools/perf/scripts/python/stackcollapse.py | |
| parent | 4dce35adafb5d258a58788c0282a0dd43e7ccd73 (diff) | |
Bluetooth: SMP: Fail if local and remote public key X coords match
The commit 6d19628f539f ("Bluetooth: SMP: Fail if remote and local public keys are identical")
patch be introduced since v5.13. Looks this patch can handle the
CVE-2021-37577 issue. However, it only checks if the full 64-byte
public key (X and Y coordinates) is identical, which is insufficient.
In CVE-2021-37577:
Bluetooth LE and BR/EDR Secure Connections pairing and Secure Simple
Pairing using the Passkey entry protocol in Bluetooth Core
Specifications 2.1 through 5.3 may permit an unauthenticated
man-in-the-middle attacker to identify the Passkey used during pairing
by reflection of a crafted public key with the same X coordinate as the
offered public key and by reflection of the authentication evidence of
the initiating device, potentially permitting this attacker to complete
authenticated pairing with the responding device using the correct
Passkey for the pairing session. This is a related issue to
CVE-2020-26558.
Furthermore, according to the Bluetooth Core Specification, the remote
and local public keys should not have the same X coordinate:
Bluetooth Core Specification Version: v5.4
(7.1 PHASE 1: PUBLIC KEY EXCHANGE)
"If the two public keys have the same X coordinate and neither is the
debug key (see [Vol 4] Part E, Section 7.6.4), each device should fail
the pairing process."
Bluetooth Core Specification Version: v6.0
(7.1 Phase 1: Public key exchange)
"If the two public keys have the same X coordinate and neither is the
debug key (see [Vol 4] Part E, Section 7.6.4), each device shall fail
the pairing process."
To ensure both initiator and responder roles strictly enforce this rule:
- In smp_cmd_public_key(), restrict the check for the initiator to
compare only the 32-byte X coordinate of the public keys rather than
the full 64 bytes.
- In sc_send_public_key(), add the corresponding check for the responder
to verify that the 32-byte X coordinate of remote_pk does not match
local_pk before transmitting its own public key.
This makes the validation compliant with the specification and mitigates
CVE-2021-37577 across both pairing roles.
Fixes: 6d19628f539f ("Bluetooth: SMP: Fail if remote and local public keys are identical")
Link: https://nvd.nist.gov/vuln/detail/cve-2021-37577
Signed-off-by: Chun-Yi Lee <jlee@suse.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
