Bluetooth: L2CAP: Fix response to L2CAP_ECRED_CONN_REQ
Subsystems (2)
Luiz Augusto von Dentz
maintainerPATCH 1/1 Bluetooth: L2CAP: Fix response to L2CAP_ECRED_CONN_REQ
From: Luiz Augusto von Dentz <[email protected]>
Similar to 03dba9cea72f ("Bluetooth: L2CAP: Fix not responding with L2CAP_CR_LE_ENCRYPTION") the result code L2CAP_CR_LE_ENCRYPTION shall be used when BT_SECURITY_MEDIUM is set since that means security mode 2 which mean it doesn't require authentication which results in qualification test L2CAP/ECFC/BV-32-C failing.
--- net/bluetooth/l2cap_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/bluetooth/l2cap_core.c +2 -1
@@ -5112,7 +5112,8 @@ static inline int l2cap_ecred_conn_req(struct l2cap_conn *conn,if (!smp_sufficient_security (conn->hcon, pchan->sec_level,SMP_ALLOW_STK )) { - result =L2CAP_CR_LE_AUTHENTICATION ; + result = pchan->sec_level ==BT_SECURITY_MEDIUM ? +L2CAP_CR_LE_ENCRYPTION :L2CAP_CR_LE_AUTHENTICATION ; goto unlock; }
Signature · 1 line
2.52.0
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/project/bluetooth/list/?series=1053246
---Test result---
Test Summary:
CheckPatch PENDING 0.34 seconds GitLint PENDING 0.32 seconds SubjectPrefix PASS 0.09 seconds BuildKernel PASS 25.86 seconds CheckAllWarning PASS 28.39 seconds CheckSparse WARNING 31.89 seconds BuildKernel32 PASS 25.36 seconds TestRunnerSetup PASS 577.67 seconds TestRunner_l2cap-tester PASS 29.96 seconds TestRunner_iso-tester FAIL 62.16 seconds TestRunner_bnep-tester PASS 6.68 seconds TestRunner_mgmt-tester FAIL 126.49 seconds TestRunner_rfcomm-tester PASS 9.50 seconds TestRunner_sco-tester FAIL 14.79 seconds TestRunner_ioctl-tester PASS 10.65 seconds TestRunner_mesh-tester FAIL 12.48 seconds TestRunner_smp-tester PASS 9.00 seconds TestRunner_userchan-tester PASS 9.54 seconds IncrementalBuild PENDING 0.89 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: CheckSparse - WARNING
Desc: Run sparse tool with linux kernel
Output:net/bluetooth/l2cap_core.c:7765:1: error: bad constant expressionnet/bluetooth/l2cap_core.c:7766:1: error: bad constant expressionnet/bluetooth/l2cap_core.c:7768:1: error: bad constant expressionnet/bluetooth/l2cap_core.c:7769:1: error: bad constant expression
##############################
Test: TestRunner_iso-tester - FAIL
Desc: Run iso-tester with test-runner
Output:
BUG: KASAN: slab-use-after-free in le_read_features_complete+0x7e/0x2b0
Total: 141, Passed: 141 (100.0%), Failed: 0, Not Run: 0
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 494, Passed: 489 (99.0%), Failed: 1, Not Run: 4
Failed Test Cases
Read Exp Feature - Success Failed 0.114 seconds
##############################
Test: TestRunner_sco-tester - FAIL
Desc: Run sco-tester with test-runner
Output:
WARNING: possible circular locking dependency detected
BUG: sleeping function called from invalid context at net/core/sock.c:3782
Total: 30, Passed: 30 (100.0%), Failed: 0, Not Run: 0
##############################
Test: TestRunner_mesh-tester - FAIL
Desc: Run mesh-tester with test-runner Output:
Total: 10, Passed: 8 (80.0%), Failed: 2, Not Run: 0
Failed Test Cases
Mesh - Send cancel - 1 Timed out 2.608 seconds Mesh - Send cancel - 2 Timed out 1.994 seconds
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series Output:
---
Regards,
Linux Bluetooth
This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <[email protected]>:
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <[email protected]>:
Quoted 9 lines · On Wed, 11 Feb 2026 15:28:15 -0500 you wrote:
From: Luiz Augusto von Dentz <[email protected]>
Similar to
03dba9cea72f("Bluetooth: L2CAP: Fix not responding withL2CAP_CR_LE_ENCRYPTION") the result codeL2CAP_CR_LE_ENCRYPTIONshall be used whenBT_SECURITY_MEDIUMis set since that means security mode 2 which mean it doesn't require authentication which results in qualification test L2CAP/ECFC/BV-32-C failing.[...]
Here is the summary with links:
- [v1] Bluetooth: L2CAP: Fix response to L2CAP_ECRED_CONN_REQ
https://git.kernel.org/bluetooth/bluetooth-next/c/c53e4c6306b8
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html