* [PATCH] Bluetooth: SMP: Pair without bonding when not bondable
@ 2026-11-22 15:31 Simon Mikuda
2026-11-22 17:29 ` bluez.test.bot
0 siblings, 1 reply; 2+ messages in thread
From: Simon Mikuda @ 2026-11-22 15:31 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Simon Mikuda, Marcel Holtmann, Luiz Augusto von Dentz
With HCI_BONDABLE cleared, a Pairing Request or Security Request that
asks for bonding is rejected with Pairing Not Supported. A device in
non-bondable mode should pair without bonding instead: answer with the
bonding flag cleared and keep no keys.
PTS test CAP/CL/ADV/BV-01-C fails on the rejection.
Mask SMP_AUTH_BONDING out of the requested authentication, as SMP did
before b3c6410b8c75.
Fixes: b3c6410b8c75 ("Bluteooth: Reject SMP bonding if HCI_PAIRABLE is not set")
Signed-off-by: Simon Mikuda <simon.mikuda@streamunlimited.com>
---
net/bluetooth/smp.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index 2538096cae06..49cc972b3338 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -1746,9 +1746,8 @@ static u8 smp_cmd_pairing_req(struct l2cap_conn *conn, struct sk_buff *skb)
/* We didn't start the pairing, so match remote */
auth = req->auth_req & AUTH_REQ_MASK(hdev);
- if (!hci_dev_test_flag(hdev, HCI_BONDABLE) &&
- (auth & SMP_AUTH_BONDING))
- return SMP_PAIRING_NOTSUPP;
+ if (!hci_dev_test_flag(hdev, HCI_BONDABLE))
+ auth &= ~SMP_AUTH_BONDING;
if (hci_dev_test_flag(hdev, HCI_SC_ONLY) && !(auth & SMP_AUTH_SC))
return SMP_AUTH_REQUIREMENTS;
@@ -2357,9 +2356,8 @@ static u8 smp_cmd_security_req(struct l2cap_conn *conn, struct sk_buff *skb)
if (!smp)
return SMP_UNSPECIFIED;
- if (!hci_dev_test_flag(hdev, HCI_BONDABLE) &&
- (auth & SMP_AUTH_BONDING))
- return SMP_PAIRING_NOTSUPP;
+ if (!hci_dev_test_flag(hdev, HCI_BONDABLE))
+ auth &= ~SMP_AUTH_BONDING;
skb_pull(skb, sizeof(*rp));
base-commit: 4fe38719e6738feaa90486e36b0790dd5d960a96
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: Bluetooth: SMP: Pair without bonding when not bondable
2026-11-22 15:31 [PATCH] Bluetooth: SMP: Pair without bonding when not bondable Simon Mikuda
@ 2026-11-22 17:29 ` bluez.test.bot
0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2026-11-22 17:29 UTC (permalink / raw)
To: linux-bluetooth, simon.mikuda
[-- Attachment #1: Type: text/plain, Size: 1073 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/series/1218698/
---Test result---
Test Summary:
CheckPatch PASS 0.79 seconds
VerifyFixes PASS 0.13 seconds
VerifySignedoff PASS 0.14 seconds
GitLint PASS 0.36 seconds
SubjectPrefix PASS 0.13 seconds
BuildKernel PASS 30.76 seconds
CheckAllWarning PASS 35.10 seconds
CheckSparse PASS 36.91 seconds
BuildKernel32 PASS 30.52 seconds
CheckKernelLLVM PASS 33.19 seconds
TestRunnerSetup PASS 739.46 seconds
TestRunner_smp-tester PASS 5.42 seconds
IncrementalBuild PASS 28.58 seconds
https://github.com/bluez/bluetooth-next/pull/1182
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-22 17:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-22 15:31 [PATCH] Bluetooth: SMP: Pair without bonding when not bondable Simon Mikuda
2026-11-22 17:29 ` bluez.test.bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox