]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Bluetooth: SMP: make SM/PER/KDU/BI-04-C happy
authorChristian Eggers <ceggers@arri.de>
Wed, 25 Feb 2026 17:07:28 +0000 (18:07 +0100)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 12 Mar 2026 19:26:30 +0000 (15:26 -0400)
The last test step ("Test with Invalid public key X and Y, all set to
0") expects to get an "DHKEY check failed" instead of "unspecified".

Fixes: 6d19628f539f ("Bluetooth: SMP: Fail if remote and local public keys are identical")
Signed-off-by: Christian Eggers <ceggers@arri.de>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/smp.c

index e67bf7b34ea75daad34b819a201de2a322663681..485e3468bd26a05ce9538f427cb92b0a7249c20d 100644 (file)
@@ -2743,7 +2743,7 @@ static int smp_cmd_public_key(struct l2cap_conn *conn, struct sk_buff *skb)
        if (!test_bit(SMP_FLAG_DEBUG_KEY, &smp->flags) &&
            !crypto_memneq(key, smp->local_pk, 64)) {
                bt_dev_err(hdev, "Remote and local public keys are identical");
-               return SMP_UNSPECIFIED;
+               return SMP_DHKEY_CHECK_FAILED;
        }
 
        memcpy(smp->remote_pk, key, 64);