mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christian Eggers <ceggers@arri.de>
To: Marcel Holtmann <marcel@holtmann.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: <linux-bluetooth@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Christian Eggers <ceggers@arri.de>
Subject: [PATCH 4/4] Bluetooth: SMP: make SM/PER/KDU/BI-04-C happy
Date: Wed, 25 Feb 2026 18:07:28 +0100	[thread overview]
Message-ID: <20260225170728.30327-4-ceggers@arri.de> (raw)
In-Reply-To: <20260225170728.30327-1-ceggers@arri.de>

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".

Signed-off-by: Christian Eggers <ceggers@arri.de>
---
 net/bluetooth/smp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index bf61e8841535..6b35645e0996 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -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);
-- 
2.44.4


  parent reply	other threads:[~2026-02-25 17:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-25 17:07 [PATCH 1/4] Bluetooth: L2CAP: CoC: Disconnect if received packet's SDU exceeds IMTU Christian Eggers
2026-02-25 17:07 ` [PATCH 2/4] Bluetooth: L2CAP: CoC: Disconnect if received packet size exceeds MPS Christian Eggers
2026-02-25 17:24   ` Luiz Augusto von Dentz
2026-02-25 17:34     ` Christian Eggers
2026-02-25 17:07 ` [PATCH 3/4] Bluetooth: L2CAP: CoC: Disconnect if sum of payload sizes exceed SDU Christian Eggers
2026-02-25 17:07 ` Christian Eggers [this message]
2026-02-25 17:14 ` [PATCH 1/4] Bluetooth: L2CAP: CoC: Disconnect if received packet's SDU exceeds IMTU Luiz Augusto von Dentz
2026-02-25 20:00 ` patchwork-bot+bluetooth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260225170728.30327-4-ceggers@arri.de \
    --to=ceggers@arri.de \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®