* RE: L2CAP: Fix channels being established with insufficient security
2026-11-24 20:50 [PATCH v4 1/2] Bluetooth: L2CAP: Fix accepting channels " Luiz Augusto von Dentz
@ 2026-11-25 2:54 ` bluez.test.bot
0 siblings, 0 replies; 8+ messages in thread
From: bluez.test.bot @ 2026-11-25 2:54 UTC (permalink / raw)
To: linux-bluetooth, luiz.dentz
[-- Attachment #1: Type: text/plain, Size: 2745 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/1221284/
---Test result---
Test Summary:
CheckPatch FAIL 1.78 seconds
VerifyFixes PASS 0.12 seconds
VerifySignedoff PASS 0.12 seconds
GitLint PASS 0.66 seconds
SubjectPrefix PASS 0.23 seconds
BuildKernel PASS 31.47 seconds
CheckAllWarning PASS 35.50 seconds
CheckSparse PASS 38.50 seconds
BuildKernel32 PASS 31.62 seconds
CheckKernelLLVM PASS 32.82 seconds
TestRunnerSetup PASS 757.30 seconds
TestRunner_l2cap-tester FAIL 15.11 seconds
TestRunner_iso-tester PASS 13.31 seconds
TestRunner_bnep-tester PASS 3.17 seconds
TestRunner_mgmt-tester PASS 89.01 seconds
TestRunner_rfcomm-tester PASS 4.52 seconds
TestRunner_sco-tester PASS 5.68 seconds
TestRunner_ioctl-tester PASS 4.68 seconds
TestRunner_mesh-tester PASS 4.53 seconds
TestRunner_smp-tester PASS 4.39 seconds
TestRunner_userchan-tester PASS 3.26 seconds
TestRunner_6lowpan-tester PASS 4.47 seconds
IncrementalBuild PASS 31.84 seconds
Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[v4,2/2] Bluetooth: L2CAP: Don't offer deferred channels before security is met
WARNING: Non-standard signature: Assisted-by:
#147:
Assisted-by: OpenCode:claude-fable-5.2
ERROR: Unrecognized email address: 'OpenCode:claude-fable-5.2'
#147:
Assisted-by: OpenCode:claude-fable-5.2
total: 1 errors, 1 warnings, 0 checks, 35 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
/home/runner/work/bluetooth-next/bluetooth-next/src/patch/15018725.patch has style problems, please review.
NOTE: Ignored message types: UNKNOWN_COMMIT_ID
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
##############################
Test: TestRunner_l2cap-tester - FAIL
Desc: Run l2cap-tester with test-runner
Output:
Total: 144, Passed: 143 (99.3%), Failed: 1, Not Run: 0
Failed Test Cases
L2CAP BR/EDR Client SSP - Success 2 Failed 0.125 seconds
https://github.com/bluez/bluetooth-next/pull/1220
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v7 0/4] L2CAP: Fix channels being established with insufficient security
@ 2026-11-25 21:12 Luiz Augusto von Dentz
2026-11-25 21:12 ` [PATCH v7 1/4] Bluetooth: L2CAP: Fix rejecting all Enhanced Credit channels if one is refused Luiz Augusto von Dentz
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Luiz Augusto von Dentz @ 2026-11-25 21:12 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
l2cap_security_cfm() lowers the security level of a channel to the one
of the link when encryption completes, and accepts channels waiting for
the security to be met as long as the status is success, so a channel
can end up established, or be offered to a listener using
BT_DEFER_SETUP, over a link that doesn't meet the security level it
requires, e.g. if the peer disables encryption while the channel waits
for userspace to authorize it.
The first two patches fix the handling of Enhanced Credit Based requests
when only some of their channels are refused, e.g. when the listener
limits the number of channels: the response accepts the channels that
were authorized instead of rejecting all of them, and the socket of a
refused channel is no longer leaked. The refusal done by the third patch
relies on them.
The third patch makes l2cap_security_cfm() compare the security level
of the link with the one required by the channel, which is now kept
apart from the one of the link in min_sec_level: encryption completing
below it is a downgrade, so the channel is no longer lowered to match
it but disconnected, or refused if it was still pending, and the link is
disconnected if the channel is a fixed one since it can't be
disconnected at L2CAP. Channels waiting to be accepted or started only
proceed if the link is encrypted and meets their security level, and
deferred LE and Enhanced Credit Based channels are refused when
userspace authorizes them if it no longer does.
The fourth patch makes a BR/EDR channel visible to the listener only
once it is offered to it, after the security is met, instead of as soon
as the connection request is responded as pending, so a listener that
accepts without waiting to be notified can't authorize a connection
while authentication is still pending.
Tests for both are sent to the BlueZ mailing list as "[PATCH BlueZ v4
0/5] Add tests for security of deferred setup".
A channel requiring a security level that pairing can't provide, e.g.
BT_SECURITY_HIGH when the IO capability is NoInputNoOutput, is now
refused instead of being connected with the security level the link
ended up with.
v7:
- Add a patch fixing the response to an Enhanced Credit Based request
rejecting all of its channels, including the ones accepted, when only
some of them are refused.
- Add a patch fixing the socket of a refused Enhanced Credit Based
channel being leaked when the others of the request are still pending.
- Authentication completing before encryption is enabled is not
considered encryption being disabled: channels in BT_CONNECT and
BT_CONNECT2 wait for it, and fixed channels are not disconnected.
- Also refuse outgoing channels in BT_CONNECT on a downgrade when the
connection request was already sent.
- Restore the security level requirement of a channel if setting it
with BT_SECURITY fails.
v6:
- Evaluate the requirement of the channel in l2cap_security_cfm() after
taking chan->lock, since it can be changed by setsockopt() meanwhile.
- Treat encryption being disabled as a downgrade for fixed channels,
since l2cap_check_encryption() doesn't handle them, and don't resume
channels the link doesn't meet the security level of.
- Also refuse outgoing channels in BT_CONNECT on a downgrade.
- Close a deferred channel refused when userspace authorizes it with the
channel kept locked, so it can't be authorized by another thread
meanwhile.
v5:
- Require the link to be encrypted for channels above
BT_SECURITY_LOW, since the security level of the link is updated when
authentication completes, before encryption is enabled.
- Disconnect the link if a fixed channel is downgraded no matter its
state, so one still waiting for security doesn't bypass it.
- Keep the security level required by a channel in min_sec_level
instead of comparing with sec_level, which follows the one of the
link, so channels that only asked for BT_SECURITY_LOW, like SMP, are
not considered downgraded when the link is paired again with a lower
security level.
- Refuse deferred LE Credit Based and Enhanced Credit Based channels
when userspace authorizes them if the link doesn't meet their
security level, instead of closing them from l2cap_security_cfm(),
since rejecting an Enhanced Credit Based channel deletes the others
of the same request.
- Refuse deferred LE Credit Based channels in l2cap_security_cfm() when
the link doesn't meet their security level.
v4:
- Disconnect the link instead of the channel if a fixed channel is
downgraded, since it can't be disconnected at L2CAP.
- Call chan->ops->close() when a channel was deleted by the downgrade,
so its socket is not leaked, and also refuse deferred LE Credit
Based channels in BT_CONNECT2.
- Only start channels in BT_CONNECT if the link meets their security
level.
v3:
- Don't use l2cap_chan_check_security(), which may start
authentication or encryption, compare the security levels instead.
- Treat encryption completing below the security level of a channel as
a downgrade and disconnect it instead of lowering its security
level.
- Only let accept() return children in BT_CONNECT2, as
bt_accept_poll() does.
v2:
- Drop BT_SK_ACCEPTED and the changes to l2cap_sock_defer().
- Add the second patch for listeners accepting while the security is
still pending.
Luiz Augusto von Dentz (3):
Bluetooth: L2CAP: Fix rejecting all Enhanced Credit channels if one is
refused
Bluetooth: L2CAP: Fix leaking the socket of refused Enhanced Credit
channels
Bluetooth: L2CAP: Don't offer deferred channels before security is met
Mohammed Alquraini (1):
Bluetooth: L2CAP: Fix accepting channels with insufficient security
include/net/bluetooth/l2cap.h | 7 ++
net/bluetooth/af_bluetooth.c | 6 +-
net/bluetooth/l2cap_core.c | 204 +++++++++++++++++++++++++++++++---
net/bluetooth/l2cap_sock.c | 54 +++++++--
net/bluetooth/rfcomm/core.c | 1 +
5 files changed, 246 insertions(+), 26 deletions(-)
--
2.56.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v7 1/4] Bluetooth: L2CAP: Fix rejecting all Enhanced Credit channels if one is refused
2026-11-25 21:12 [PATCH v7 0/4] L2CAP: Fix channels being established with insufficient security Luiz Augusto von Dentz
@ 2026-11-25 21:12 ` Luiz Augusto von Dentz
2026-11-26 3:44 ` L2CAP: Fix channels being established with insufficient security bluez.test.bot
2026-11-25 21:12 ` [PATCH v7 2/4] Bluetooth: L2CAP: Fix leaking the socket of refused Enhanced Credit channels Luiz Augusto von Dentz
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Luiz Augusto von Dentz @ 2026-11-25 21:12 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
l2cap_ecred_rsp_defer() responds to a request that has some of its
channels refused with a rejection for all of them, deleting the channels
that userspace has already accepted as well, e.g. when the listener
limits the number of channels, like bluetoothd does for EATT.
A L2CAP_CREDIT_BASED_CONNECTION_RSP can accept only some of the
channels of the request: the destination CID of the ones refused is set
to 0x0000 and the result tells that only some of the connections were
refused.
Fix this by responding with L2CAP_CR_LE_NO_MEM if only some of the
channels were refused, with the destination CID of the ones accepted and
none for the refused ones, and by deleting only the refused ones. If all
of them are refused the response is unchanged.
Fixes: 9aa9d9473f15 ("Bluetooth: L2CAP: Fix responding with wrong PDU type")
Assisted-by: OpenCode:claude-fable-5.2
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
net/bluetooth/l2cap_core.c | 67 +++++++++++++++++++++++++++++++++-----
1 file changed, 58 insertions(+), 9 deletions(-)
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 943effc86740..a15ffcdd1330 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -4065,6 +4065,34 @@ static void l2cap_ecred_list_defer(struct l2cap_chan *chan, void *data)
}
}
+struct l2cap_ecred_defer_count {
+ int pending;
+ int accepted;
+ int refused;
+};
+
+static void l2cap_ecred_list_count(struct l2cap_chan *chan, void *data)
+{
+ struct l2cap_ecred_defer_count *count = data;
+
+ if (test_bit(FLAG_ECRED_CONN_REQ_SENT, &chan->flags))
+ return;
+
+ switch (chan->state) {
+ case BT_CONNECT2:
+ /* Still pending accept */
+ count->pending++;
+ return;
+ case BT_CONNECTED:
+ count->accepted++;
+ return;
+ default:
+ /* If not connected or pending accept it has been refused */
+ count->refused++;
+ return;
+ }
+}
+
struct l2cap_ecred_rsp_data {
struct l2cap_chan *locked_chan;
struct {
@@ -4072,6 +4100,7 @@ struct l2cap_ecred_rsp_data {
__le16 scid[L2CAP_ECRED_MAX_CID];
} __packed pdu;
int count;
+ bool partial;
};
/* Lock @chan if it is not @locked_chan, and has same or lower nesting level.
@@ -4141,14 +4170,23 @@ static void l2cap_ecred_rsp_defer(struct l2cap_chan *chan, void *data)
chan->ident = 0;
/* Unreachable, check in l2cap_ecred_conn_req. If reached, drop rest */
- if (WARN_ON_ONCE(rsp->count >= ARRAY_SIZE(rsp->pdu.scid)))
+ if (WARN_ON_ONCE(rsp->count >= ARRAY_SIZE(rsp->pdu.scid))) {
rsp->pdu.rsp.result = cpu_to_le16(L2CAP_CR_LE_NO_MEM);
+ l2cap_chan_del(chan, ECONNRESET);
+ goto done;
+ }
- /* Include all channels pending with the same ident */
- if (!rsp->pdu.rsp.result)
+ /* Include all channels pending with the same ident, the ones refused
+ * have no destination CID if only some of them were.
+ */
+ if (chan->state == BT_CONNECTED) {
rsp_flex->dcid[rsp->count++] = cpu_to_le16(chan->scid);
- else
+ } else {
+ if (rsp->partial)
+ rsp_flex->dcid[rsp->count++] = 0;
+
l2cap_chan_del(chan, ECONNRESET);
+ }
done:
if (locked)
@@ -4161,8 +4199,8 @@ void __l2cap_ecred_conn_rsp_defer(struct l2cap_chan *chan)
{
struct l2cap_conn *conn = chan->conn;
struct l2cap_ecred_rsp_data data;
+ struct l2cap_ecred_defer_count count = {};
u16 id = chan->ident;
- int result = 0;
if (!id)
return;
@@ -4181,13 +4219,24 @@ void __l2cap_ecred_conn_rsp_defer(struct l2cap_chan *chan)
data.pdu.rsp.result = cpu_to_le16(L2CAP_CR_LE_SUCCESS);
/* Verify that all channels are ready */
- __l2cap_chan_list_id(conn, id, l2cap_ecred_list_defer, &result);
+ __l2cap_chan_list_id(conn, id, l2cap_ecred_list_count, &count);
- if (result > 0)
+ if (count.pending)
return;
- if (result < 0)
- data.pdu.rsp.result = cpu_to_le16(L2CAP_CR_LE_AUTHORIZATION);
+ /* Only some of the channels may have been refused, e.g. if the
+ * listener limits the number of channels, in which case the others
+ * are accepted.
+ */
+ if (count.refused) {
+ if (count.accepted) {
+ data.pdu.rsp.result = cpu_to_le16(L2CAP_CR_LE_NO_MEM);
+ data.partial = true;
+ } else {
+ data.pdu.rsp.result =
+ cpu_to_le16(L2CAP_CR_LE_AUTHORIZATION);
+ }
+ }
/* Build response */
__l2cap_chan_list_id(conn, id, l2cap_ecred_rsp_defer, &data);
--
2.56.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v7 2/4] Bluetooth: L2CAP: Fix leaking the socket of refused Enhanced Credit channels
2026-11-25 21:12 [PATCH v7 0/4] L2CAP: Fix channels being established with insufficient security Luiz Augusto von Dentz
2026-11-25 21:12 ` [PATCH v7 1/4] Bluetooth: L2CAP: Fix rejecting all Enhanced Credit channels if one is refused Luiz Augusto von Dentz
@ 2026-11-25 21:12 ` Luiz Augusto von Dentz
2026-11-25 21:12 ` [PATCH v7 3/4] Bluetooth: L2CAP: Fix accepting channels with insufficient security Luiz Augusto von Dentz
2026-11-25 21:12 ` [PATCH v7 4/4] Bluetooth: L2CAP: Don't offer deferred channels before security is met Luiz Augusto von Dentz
3 siblings, 0 replies; 8+ messages in thread
From: Luiz Augusto von Dentz @ 2026-11-25 21:12 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
When a deferred Enhanced Credit Based channel is refused, e.g. because
userspace closed it, while other channels of the same request are still
waiting to be authorized, the channel is kept in BT_DISCONN until the
response is sent so it can be included in it.
l2cap_sock_release() then calls l2cap_sock_kill(), but that does
nothing for a socket that is not flagged SOCK_ZAPPED yet, which only
chan->ops->teardown() does, and when the channel is deleted later by
the response nobody kills the socket anymore, leaking it along with the
references it holds.
Fix this by calling chan->ops->teardown() when the channel is refused
and not deleted right away, so its socket can be killed by its owner
once it is closed. Deleting the channel afterwards has nothing left to
do for its socket.
Fixes: 9aa9d9473f15 ("Bluetooth: L2CAP: Fix responding with wrong PDU type")
Assisted-by: OpenCode:claude-fable-5.2
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
net/bluetooth/l2cap_core.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index a15ffcdd1330..d39d8b8c47be 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -841,6 +841,14 @@ static void l2cap_chan_ecred_connect_reject(struct l2cap_chan *chan)
l2cap_state_change(chan, BT_DISCONN);
__l2cap_ecred_conn_rsp_defer(chan);
+
+ /* The response is only sent once the other channels of the request are
+ * authorized or refused, so the channel is kept until then to be
+ * included in it, but its socket has to be released now so it can be
+ * freed when its owner closes it.
+ */
+ if (!test_bit(FLAG_DEL, &chan->flags))
+ chan->ops->teardown(chan, ECONNREFUSED);
}
static void l2cap_chan_connect_reject(struct l2cap_chan *chan)
--
2.56.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v7 3/4] Bluetooth: L2CAP: Fix accepting channels with insufficient security
2026-11-25 21:12 [PATCH v7 0/4] L2CAP: Fix channels being established with insufficient security Luiz Augusto von Dentz
2026-11-25 21:12 ` [PATCH v7 1/4] Bluetooth: L2CAP: Fix rejecting all Enhanced Credit channels if one is refused Luiz Augusto von Dentz
2026-11-25 21:12 ` [PATCH v7 2/4] Bluetooth: L2CAP: Fix leaking the socket of refused Enhanced Credit channels Luiz Augusto von Dentz
@ 2026-11-25 21:12 ` Luiz Augusto von Dentz
2026-11-25 21:12 ` [PATCH v7 4/4] Bluetooth: L2CAP: Don't offer deferred channels before security is met Luiz Augusto von Dentz
3 siblings, 0 replies; 8+ messages in thread
From: Luiz Augusto von Dentz @ 2026-11-25 21:12 UTC (permalink / raw)
To: linux-bluetooth
From: Mohammed Alquraini <mohammed.saad.alquraini@gmail.com>
When the link security changes, l2cap_security_cfm() doesn't check
that the result meets the security level required by the channels:
- If encryption completes it sets chan->sec_level to hcon->sec_level,
so a channel requiring a higher security level than the one the
link ended up with has its requirement lowered instead of being
refused.
- A channel in BT_CONNECT2 is accepted, or offered to the listener if
it uses BT_DEFER_SETUP, as long as the status is success and the
encryption key size is valid, e.g. if the peer disables encryption
while the channel waits for userspace to authorize it, the channel
is offered again and, once authorized, it is established over an
unencrypted link.
- A channel in BT_CONNECT is started as long as the status is
success, no matter if the link meets its security level.
- The security level of the link is updated when authentication
completes, before encryption is enabled, so it can't be used alone
to tell if the link is secure enough.
Fix this by treating encryption completing with a security level
below the one required by a channel as a downgrade: the security level
of the channel is no longer lowered and the channel is disconnected,
or refused with L2CAP_CR_SEC_BLOCK if it was pending. There is no way
to disconnect a fixed channel at L2CAP, so for those the link is
disconnected instead, which also applies when encryption is disabled
since l2cap_check_encryption() doesn't handle them. Channels in
BT_CONNECT2 and BT_CONNECT are only accepted, or started, if the link
is encrypted and meets their security level, and established channels
are not resumed if it doesn't. Authentication completing before
encryption is enabled is not considered encryption being disabled, the
channels in BT_CONNECT and BT_CONNECT2 just wait for it.
Since chan->sec_level follows the security level of the link once
encryption is enabled it can't tell what a channel requires, so keep
that in the new min_sec_level, which is set wherever the security level
is requested for the channel, otherwise channels that never asked for
more than BT_SECURITY_LOW, like SMP, would be considered downgraded
when the link is paired again with a lower security level.
Deferred LE Credit Based and Enhanced Credit Based channels wait in
BT_CONNECT2 for userspace to authorize them, which doesn't check the
security level, so refuse them there if the link no longer meets it,
with the channel kept locked until it is closed so it can't be
authorized meanwhile. Only that channel is refused, the others of the
same request are responded individually. Enhanced Credit Based
channels are only refused there since the response of the request is
only sent once all of its channels have been authorized or refused.
This means a channel requiring a security level that pairing can't
provide, e.g. BT_SECURITY_HIGH when the IO capability is
NoInputNoOutput, is now refused instead of being connected with the
security level the link ended up with.
AI assistance was used in finding and preparing this patch.
Fixes: f66dc81f44d9 ("Bluetooth: Add support for deferring L2CAP connection setup")
Assisted-by: OpenCode:claude-fable-5.2
Signed-off-by: Mohammed Alquraini <mohammed.saad.alquraini@gmail.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
include/net/bluetooth/l2cap.h | 7 ++
net/bluetooth/l2cap_core.c | 129 ++++++++++++++++++++++++++++++++--
net/bluetooth/l2cap_sock.c | 44 +++++++++---
net/bluetooth/rfcomm/core.c | 1 +
4 files changed, 166 insertions(+), 15 deletions(-)
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index 72d9d56c6f2a..a68aa4228206 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -544,7 +544,12 @@ struct l2cap_chan {
__u8 chan_type;
__u8 chan_policy;
+ /* The security level of the link, which sec_level follows once
+ * encryption is enabled, so it can't tell what the channel requires,
+ * that is what min_sec_level is for.
+ */
__u8 sec_level;
+ __u8 min_sec_level;
__u8 mic_len;
__u8 ident;
@@ -987,6 +992,8 @@ int l2cap_add_psm(struct l2cap_chan *chan, bdaddr_t *src, __le16 psm);
int l2cap_add_scid(struct l2cap_chan *chan, __u16 scid);
struct l2cap_chan *l2cap_chan_create(void);
+bool l2cap_chan_sec_level_ok(struct l2cap_chan *chan);
+void l2cap_chan_close(struct l2cap_chan *chan, int reason);
void l2cap_chan_close_unlocked(struct l2cap_chan *chan, int reason)
__must_not_hold(&chan->lock);
int l2cap_chan_connect(struct l2cap_chan *chan, __le16 psm, u16 cid,
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index d39d8b8c47be..c81eff21468c 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -551,6 +551,7 @@ void l2cap_chan_set_defaults(struct l2cap_chan *chan, struct l2cap_chan *pchan)
chan->remote_tx_win = chan->tx_win;
chan->ack_win = L2CAP_DEFAULT_TX_WINDOW;
chan->sec_level = BT_SECURITY_LOW;
+ chan->min_sec_level = BT_SECURITY_LOW;
chan->flush_to = L2CAP_DEFAULT_FLUSH_TO;
chan->retrans_timeout = L2CAP_DEFAULT_RETRANS_TO;
chan->monitor_timeout = L2CAP_DEFAULT_MONITOR_TO;
@@ -567,6 +568,7 @@ void l2cap_chan_set_defaults(struct l2cap_chan *chan, struct l2cap_chan *pchan)
chan->tx_win = pchan->tx_win;
chan->tx_win_max = pchan->tx_win_max;
chan->sec_level = pchan->sec_level;
+ chan->min_sec_level = pchan->min_sec_level;
chan->mic_len = pchan->mic_len;
chan->conf_state = pchan->conf_state;
chan->flags = pchan->flags;
@@ -5230,6 +5232,8 @@ static int l2cap_le_connect_rsp(struct l2cap_conn *conn,
sec_level = hcon->sec_level + 1;
if (chan->sec_level < sec_level)
chan->sec_level = sec_level;
+ if (chan->min_sec_level < sec_level)
+ chan->min_sec_level = sec_level;
/* We'll need to send a new Connect Request */
clear_bit(FLAG_LE_CONN_REQ_SENT, &chan->flags);
@@ -5846,6 +5850,8 @@ static inline int l2cap_ecred_conn_rsp(struct l2cap_conn *conn,
sec_level = hcon->sec_level + 1;
if (chan->sec_level < sec_level)
chan->sec_level = sec_level;
+ if (chan->min_sec_level < sec_level)
+ chan->min_sec_level = sec_level;
/* We'll need to send a new Connect Request */
clear_bit(FLAG_ECRED_CONN_REQ_SENT, &chan->flags);
@@ -8152,11 +8158,37 @@ static inline void l2cap_check_encryption(struct l2cap_chan *chan, u8 encrypt)
}
}
+/* Check if the link meets the security level required by the channel, which
+ * for anything above BT_SECURITY_LOW needs the link to be encrypted since the
+ * security level of the link is updated when authentication completes, before
+ * encryption is enabled.
+ */
+static bool l2cap_chan_sec_level_met(struct hci_conn *hcon,
+ struct l2cap_chan *chan)
+{
+ if (chan->min_sec_level <= BT_SECURITY_LOW)
+ return true;
+
+ return test_bit(HCI_CONN_ENCRYPT, hcon->flags) &&
+ hcon->sec_level >= chan->min_sec_level;
+}
+
+void l2cap_chan_close(struct l2cap_chan *chan, int reason)
+{
+ /* Context analysis: caller holds chan->lock and chan->conn->lock */
+ context_unsafe(__l2cap_chan_close(chan, reason));
+}
+
+bool l2cap_chan_sec_level_ok(struct l2cap_chan *chan)
+{
+ return l2cap_chan_sec_level_met(chan->conn->hcon, chan);
+}
+
static void l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt)
__must_hold(&hcon->hdev->lock)
{
struct l2cap_conn *conn = hcon->l2cap_data;
- struct l2cap_chan *chan;
+ struct l2cap_chan *chan, *tmp;
if (!conn)
return;
@@ -8165,7 +8197,9 @@ static void l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt)
mutex_lock(&conn->lock);
- list_for_each_entry(chan, &conn->chan_l, list) {
+ list_for_each_entry_safe(chan, tmp, &conn->chan_l, list) {
+ bool unmet, encrypting, downgrade = false;
+
l2cap_chan_lock(chan);
lockdep_assert_held(&chan->conn->lock);
@@ -8173,8 +8207,83 @@ static void l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt)
BT_DBG("chan %p scid 0x%4.4x state %s", chan, chan->scid,
state_to_string(chan->state));
- if (!status && encrypt)
- chan->sec_level = hcon->sec_level;
+ /* Authentication completing before encryption is enabled
+ * updates the security level of the link, so it already meets
+ * the one required, but it is not encrypted yet: encryption is
+ * expected to follow instead of it having been disabled.
+ */
+ encrypting = !status && !encrypt &&
+ chan->min_sec_level > BT_SECURITY_LOW &&
+ !test_bit(HCI_CONN_ENCRYPT, hcon->flags) &&
+ hcon->sec_level >= chan->min_sec_level;
+
+ /* The requirement of the channel may change under chan->lock */
+ unmet = !status && !encrypting &&
+ !l2cap_chan_sec_level_met(hcon, chan);
+
+ if (!status && encrypt) {
+ /* Encryption completing with a security level below
+ * the one the channel requires is a downgrade, don't
+ * lower the requirement of the channel to match it.
+ */
+ if (unmet)
+ downgrade = true;
+ else
+ chan->sec_level = hcon->sec_level;
+ } else if (unmet && chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) {
+ /* Unlike the other channels, l2cap_check_encryption()
+ * doesn't handle fixed ones, so encryption being
+ * disabled is a downgrade for them as well.
+ */
+ downgrade = true;
+ }
+
+ /* A channel that is not established yet is refused as soon as
+ * the link doesn't meet its security level, while an
+ * established one is only closed on a downgrade since
+ * l2cap_check_encryption() handles encryption being disabled.
+ *
+ * Enhanced Credit Based channels waiting in BT_CONNECT2 are
+ * refused when userspace authorizes them instead, since the
+ * response of the request is only sent once all of its
+ * channels have been authorized or refused.
+ */
+ if ((downgrade && (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED ||
+ chan->state == BT_CONNECTED ||
+ chan->state == BT_CONFIG ||
+ chan->state == BT_CONNECT)) ||
+ (unmet && chan->state == BT_CONNECT2 &&
+ chan->mode == L2CAP_MODE_LE_FLOWCTL)) {
+ /* There is no way to disconnect a fixed channel at
+ * L2CAP, so drop the link, which takes down the rest
+ * of the channels as well.
+ */
+ if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) {
+ hci_disconnect(hcon, HCI_ERROR_AUTH_FAILURE);
+ l2cap_chan_unlock(chan);
+ break;
+ }
+
+ /* The channel may be removed from the list */
+ l2cap_chan_hold(chan);
+ __l2cap_chan_close(chan, ECONNREFUSED);
+
+ if (test_bit(FLAG_DEL, &chan->flags))
+ chan->ops->close(chan);
+
+ l2cap_chan_unlock(chan);
+ l2cap_chan_put(chan);
+ continue;
+ }
+
+ /* A channel waiting for the encryption to be enabled has to
+ * wait for it before being accepted or started.
+ */
+ if (encrypting && (chan->state == BT_CONNECT ||
+ chan->state == BT_CONNECT2)) {
+ l2cap_chan_unlock(chan);
+ continue;
+ }
if (!__l2cap_no_conn_pending(chan)) {
l2cap_chan_unlock(chan);
@@ -8183,14 +8292,19 @@ static void l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt)
if (!status && (chan->state == BT_CONNECTED ||
chan->state == BT_CONFIG)) {
- chan->ops->resume(chan);
+ /* Don't resume a channel the link is not secure enough
+ * for, l2cap_check_encryption() deals with it.
+ */
+ if (!unmet)
+ chan->ops->resume(chan);
l2cap_check_encryption(chan, encrypt);
l2cap_chan_unlock(chan);
continue;
}
if (chan->state == BT_CONNECT) {
- if (!status && l2cap_check_enc_key_size(hcon, chan))
+ if (!status && l2cap_chan_sec_level_met(hcon, chan) &&
+ l2cap_check_enc_key_size(hcon, chan))
l2cap_start_connection(chan);
else
__set_chan_timer(chan, L2CAP_DISC_TIMEOUT);
@@ -8200,7 +8314,8 @@ static void l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt)
struct l2cap_conn_rsp rsp;
__u16 res, stat;
- if (!status && l2cap_check_enc_key_size(hcon, chan)) {
+ if (!status && l2cap_check_enc_key_size(hcon, chan) &&
+ l2cap_chan_sec_level_met(hcon, chan)) {
if (test_bit(FLAG_DEFER_SETUP, &chan->flags)) {
res = L2CAP_CR_PEND;
stat = L2CAP_CS_AUTHOR_PEND;
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index d5663a4642a9..a6916e01d1b6 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -47,6 +47,15 @@ static struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock,
struct l2cap_chan *chan);
static void l2cap_sock_cleanup_listen(struct sock *parent);
+/* Set the security level required by the channel, as opposed to the one of the
+ * link that chan->sec_level follows.
+ */
+static void l2cap_sock_set_sec_level(struct l2cap_chan *chan, __u8 level)
+{
+ chan->sec_level = level;
+ chan->min_sec_level = level;
+}
+
bool l2cap_is_socket(struct socket *sock)
{
return sock && sock->ops == &l2cap_sock_ops;
@@ -143,15 +152,15 @@ static int l2cap_sock_bind(struct socket *sock, struct sockaddr_unsized *addr, i
switch (chan->chan_type) {
case L2CAP_CHAN_CONN_LESS:
if (__le16_to_cpu(la.l2_psm) == L2CAP_PSM_3DSP)
- chan->sec_level = BT_SECURITY_SDP;
+ l2cap_sock_set_sec_level(chan, BT_SECURITY_SDP);
break;
case L2CAP_CHAN_CONN_ORIENTED:
if (__le16_to_cpu(la.l2_psm) == L2CAP_PSM_SDP ||
__le16_to_cpu(la.l2_psm) == L2CAP_PSM_RFCOMM)
- chan->sec_level = BT_SECURITY_SDP;
+ l2cap_sock_set_sec_level(chan, BT_SECURITY_SDP);
break;
case L2CAP_CHAN_RAW:
- chan->sec_level = BT_SECURITY_SDP;
+ l2cap_sock_set_sec_level(chan, BT_SECURITY_SDP);
break;
case L2CAP_CHAN_FIXED:
/* Fixed channels default to the L2CAP core not holding a
@@ -867,11 +876,11 @@ static int l2cap_sock_setsockopt_old(struct socket *sock, int optname,
}
if (opt & L2CAP_LM_AUTH)
- chan->sec_level = BT_SECURITY_LOW;
+ l2cap_sock_set_sec_level(chan, BT_SECURITY_LOW);
if (opt & L2CAP_LM_ENCRYPT)
- chan->sec_level = BT_SECURITY_MEDIUM;
+ l2cap_sock_set_sec_level(chan, BT_SECURITY_MEDIUM);
if (opt & L2CAP_LM_SECURE)
- chan->sec_level = BT_SECURITY_HIGH;
+ l2cap_sock_set_sec_level(chan, BT_SECURITY_HIGH);
assign_bit(FLAG_ROLE_SWITCH, &chan->flags,
opt & L2CAP_LM_MASTER);
@@ -940,7 +949,7 @@ static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname,
int err = 0;
u32 opt, phys;
u16 mtu;
- u8 mode;
+ u8 mode, sec_level, min_sec_level;
BT_DBG("sk %p", sk);
@@ -991,7 +1000,10 @@ static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname,
break;
}
- chan->sec_level = sec.level;
+ sec_level = chan->sec_level;
+ min_sec_level = chan->min_sec_level;
+
+ l2cap_sock_set_sec_level(chan, sec.level);
chan->mic_len = sec.mic_len;
conn = l2cap_chan_conn(chan);
@@ -1002,6 +1014,9 @@ static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname,
if (chan->scid == L2CAP_CID_ATT) {
l2cap_chan_req_mic_len(chan, conn->hcon);
if (smp_conn_security(conn->hcon, sec.level)) {
+ /* Don't keep a requirement that failed */
+ chan->sec_level = sec_level;
+ chan->min_sec_level = min_sec_level;
err = -EINVAL;
break;
}
@@ -1019,6 +1034,8 @@ static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname,
else
sk->sk_state_change(sk);
} else {
+ chan->sec_level = sec_level;
+ chan->min_sec_level = min_sec_level;
err = -EINVAL;
}
break;
@@ -1284,6 +1301,17 @@ static int l2cap_sock_defer(struct sock *sk)
if (!have_conn) {
release_sock(sk);
err = -ENOTCONN;
+ } else if ((chan->mode == L2CAP_MODE_EXT_FLOWCTL ||
+ bdaddr_type_is_le(chan->src_type)) &&
+ !l2cap_chan_sec_level_ok(chan)) {
+ /* The link doesn't meet the security level required
+ * anymore, refuse the connection like closing it would,
+ * without releasing the channel so it can't be
+ * authorized meanwhile.
+ */
+ release_sock(sk);
+ l2cap_chan_close(chan, ECONNREFUSED);
+ err = -ECONNREFUSED;
} else if (chan->mode == L2CAP_MODE_EXT_FLOWCTL) {
sk->sk_state = BT_CONNECTED;
chan->state = BT_CONNECTED;
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
index e6af6f5f5914..66c88390ca88 100644
--- a/net/bluetooth/rfcomm/core.c
+++ b/net/bluetooth/rfcomm/core.c
@@ -852,6 +852,7 @@ static struct socket *rfcomm_session_connect(bdaddr_t *src, bdaddr_t *dst,
/* Set MTU to 0 so L2CAP can auto select the MTU */
l2cap_pi(sk)->chan->imtu = 0;
l2cap_pi(sk)->chan->sec_level = sec_level;
+ l2cap_pi(sk)->chan->min_sec_level = sec_level;
if (l2cap_ertm)
l2cap_pi(sk)->chan->mode = L2CAP_MODE_ERTM;
release_sock(sk);
--
2.56.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v7 4/4] Bluetooth: L2CAP: Don't offer deferred channels before security is met
2026-11-25 21:12 [PATCH v7 0/4] L2CAP: Fix channels being established with insufficient security Luiz Augusto von Dentz
` (2 preceding siblings ...)
2026-11-25 21:12 ` [PATCH v7 3/4] Bluetooth: L2CAP: Fix accepting channels with insufficient security Luiz Augusto von Dentz
@ 2026-11-25 21:12 ` Luiz Augusto von Dentz
3 siblings, 0 replies; 8+ messages in thread
From: Luiz Augusto von Dentz @ 2026-11-25 21:12 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
A BR/EDR channel is moved to BT_CONNECT2 as soon as the connection
request is answered as pending, no matter if it is waiting for the
information exchange, for the link security or for userspace to
authorize it, and the socket state follows the channel state.
bt_accept_poll() assumes that a child in BT_CONNECT2 of a listener
using BT_DEFER_SETUP is waiting to be authorized, and
bt_accept_dequeue() returns any child of such a listener, so although
the listener is only notified once the security is met, a listener
that doesn't wait for it can accept() the child and then authorize it
with recvmsg() while authentication is still pending.
l2cap_sock_defer() then moves the channel to BT_CONFIG and responds
with L2CAP_CR_SUCCESS, and if authentication fails afterwards the
channel is left open since l2cap_security_cfm() doesn't close channels
in BT_CONFIG.
Fix this by only moving the socket to BT_CONNECT2 when the channel is
offered to the listener with l2cap_sock_defer_cb(), which is only
called once the security is met, and by only letting accept() return a
child of a listener using BT_DEFER_SETUP once it is in BT_CONNECT2, as
bt_accept_poll() does. The child stays in the accept queue so the
backlog limit and the cleanup done when the listener is closed are not
affected.
Fixes: f66dc81f44d9 ("Bluetooth: Add support for deferring L2CAP connection setup")
Assisted-by: OpenCode:claude-fable-5.2
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
net/bluetooth/af_bluetooth.c | 6 +++++-
net/bluetooth/l2cap_sock.c | 10 +++++++++-
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c
index 7758e9ea3848..103d61d13fbf 100644
--- a/net/bluetooth/af_bluetooth.c
+++ b/net/bluetooth/af_bluetooth.c
@@ -330,8 +330,12 @@ struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock)
continue;
}
+ /* With deferred setup only a child in BT_CONNECT2 has been
+ * offered to the listener, see bt_accept_poll().
+ */
if (sk->sk_state == BT_CONNECTED || !newsock ||
- test_bit(BT_SK_DEFER_SETUP, &bt_sk(parent)->flags)) {
+ (test_bit(BT_SK_DEFER_SETUP, &bt_sk(parent)->flags) &&
+ sk->sk_state == BT_CONNECT2)) {
bt_accept_unlink(sk);
if (newsock)
sock_graft(sk, newsock);
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index a6916e01d1b6..77520c7b908a 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -1840,7 +1840,13 @@ static void l2cap_sock_state_change_cb(struct l2cap_chan *chan, int state,
lock_sock(sk);
- sk->sk_state = state;
+ /* BT_CONNECT2 also covers a channel still waiting for the information
+ * exchange or link security. Only l2cap_sock_defer_cb() moves the
+ * socket to BT_CONNECT2, once the channel can be offered to the
+ * listener.
+ */
+ if (state != BT_CONNECT2)
+ sk->sk_state = state;
if (err)
sk->sk_err = err;
@@ -1908,6 +1914,8 @@ static void l2cap_sock_defer_cb(struct l2cap_chan *chan)
lock_sock(sk);
+ sk->sk_state = BT_CONNECT2;
+
parent = bt_sk(sk)->parent;
if (parent)
parent->sk_data_ready(parent);
--
2.56.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* RE: L2CAP: Fix channels being established with insufficient security
2026-11-25 18:58 [PATCH v6 1/2] Bluetooth: L2CAP: Fix accepting channels with insufficient security Luiz Augusto von Dentz
@ 2026-11-25 21:26 ` bluez.test.bot
0 siblings, 0 replies; 8+ messages in thread
From: bluez.test.bot @ 2026-11-25 21:26 UTC (permalink / raw)
To: linux-bluetooth, luiz.dentz
[-- Attachment #1: Type: text/plain, Size: 2745 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/1222483/
---Test result---
Test Summary:
CheckPatch FAIL 2.48 seconds
VerifyFixes PASS 0.10 seconds
VerifySignedoff PASS 0.10 seconds
GitLint PASS 0.56 seconds
SubjectPrefix PASS 0.18 seconds
BuildKernel PASS 31.59 seconds
CheckAllWarning PASS 35.99 seconds
CheckSparse PASS 38.99 seconds
BuildKernel32 PASS 31.99 seconds
CheckKernelLLVM PASS 35.41 seconds
TestRunnerSetup PASS 764.13 seconds
TestRunner_l2cap-tester FAIL 15.10 seconds
TestRunner_iso-tester PASS 13.28 seconds
TestRunner_bnep-tester PASS 3.19 seconds
TestRunner_mgmt-tester PASS 89.52 seconds
TestRunner_rfcomm-tester PASS 4.48 seconds
TestRunner_sco-tester PASS 5.65 seconds
TestRunner_ioctl-tester PASS 4.71 seconds
TestRunner_mesh-tester PASS 4.51 seconds
TestRunner_smp-tester PASS 4.38 seconds
TestRunner_userchan-tester PASS 3.22 seconds
TestRunner_6lowpan-tester PASS 4.47 seconds
IncrementalBuild PASS 31.89 seconds
Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[v6,2/2] Bluetooth: L2CAP: Don't offer deferred channels before security is met
WARNING: Non-standard signature: Assisted-by:
#147:
Assisted-by: OpenCode:claude-fable-5.2
ERROR: Unrecognized email address: 'OpenCode:claude-fable-5.2'
#147:
Assisted-by: OpenCode:claude-fable-5.2
total: 1 errors, 1 warnings, 0 checks, 35 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
/home/runner/work/bluetooth-next/bluetooth-next/src/patch/15023286.patch has style problems, please review.
NOTE: Ignored message types: UNKNOWN_COMMIT_ID
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
##############################
Test: TestRunner_l2cap-tester - FAIL
Desc: Run l2cap-tester with test-runner
Output:
Total: 144, Passed: 143 (99.3%), Failed: 1, Not Run: 0
Failed Test Cases
L2CAP BR/EDR Client SSP - Success 2 Failed 0.025 seconds
https://github.com/bluez/bluetooth-next/pull/1228
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: L2CAP: Fix channels being established with insufficient security
2026-11-25 21:12 ` [PATCH v7 1/4] Bluetooth: L2CAP: Fix rejecting all Enhanced Credit channels if one is refused Luiz Augusto von Dentz
@ 2026-11-26 3:44 ` bluez.test.bot
0 siblings, 0 replies; 8+ messages in thread
From: bluez.test.bot @ 2026-11-26 3:44 UTC (permalink / raw)
To: linux-bluetooth, luiz.dentz
[-- Attachment #1: Type: text/plain, Size: 5571 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/1222578/
---Test result---
Test Summary:
CheckPatch FAIL 3.07 seconds
VerifyFixes PASS 0.08 seconds
VerifySignedoff PASS 0.08 seconds
GitLint FAIL 0.92 seconds
SubjectPrefix PASS 0.31 seconds
BuildKernel PASS 23.15 seconds
CheckAllWarning PASS 26.89 seconds
CheckSparse PASS 28.66 seconds
BuildKernel32 PASS 23.25 seconds
CheckKernelLLVM PASS 23.95 seconds
TestRunnerSetup PASS 546.55 seconds
TestRunner_l2cap-tester FAIL 19.13 seconds
TestRunner_iso-tester PASS 11.35 seconds
TestRunner_bnep-tester PASS 2.83 seconds
TestRunner_mgmt-tester PASS 84.64 seconds
TestRunner_rfcomm-tester PASS 4.07 seconds
TestRunner_sco-tester PASS 5.11 seconds
TestRunner_ioctl-tester PASS 4.26 seconds
TestRunner_mesh-tester PASS 4.20 seconds
TestRunner_smp-tester PASS 3.99 seconds
TestRunner_userchan-tester PASS 2.91 seconds
TestRunner_6lowpan-tester PASS 4.05 seconds
IncrementalBuild PASS 31.31 seconds
Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[v7,1/4] Bluetooth: L2CAP: Fix rejecting all Enhanced Credit channels if one is refused
WARNING: Non-standard signature: Assisted-by:
#138:
Assisted-by: OpenCode:claude-fable-5.2
ERROR: Unrecognized email address: 'OpenCode:claude-fable-5.2'
#138:
Assisted-by: OpenCode:claude-fable-5.2
total: 1 errors, 1 warnings, 0 checks, 105 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
/home/runner/work/bluetooth-next/bluetooth-next/src/patch/15023604.patch has style problems, please review.
NOTE: Ignored message types: UNKNOWN_COMMIT_ID
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
[v7,2/4] Bluetooth: L2CAP: Fix leaking the socket of refused Enhanced Credit channels
WARNING: Non-standard signature: Assisted-by:
#139:
Assisted-by: OpenCode:claude-fable-5.2
ERROR: Unrecognized email address: 'OpenCode:claude-fable-5.2'
#139:
Assisted-by: OpenCode:claude-fable-5.2
total: 1 errors, 1 warnings, 0 checks, 14 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
/home/runner/work/bluetooth-next/bluetooth-next/src/patch/15023605.patch has style problems, please review.
NOTE: Ignored message types: UNKNOWN_COMMIT_ID
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
[v7,3/4] Bluetooth: L2CAP: Fix accepting channels with insufficient security
WARNING: Non-standard signature: Assisted-by:
#181:
Assisted-by: OpenCode:claude-fable-5.2
ERROR: Unrecognized email address: 'OpenCode:claude-fable-5.2'
#181:
Assisted-by: OpenCode:claude-fable-5.2
total: 1 errors, 1 warnings, 0 checks, 320 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
/home/runner/work/bluetooth-next/bluetooth-next/src/patch/15023606.patch has style problems, please review.
NOTE: Ignored message types: UNKNOWN_COMMIT_ID
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
[v7,4/4] Bluetooth: L2CAP: Don't offer deferred channels before security is met
WARNING: Non-standard signature: Assisted-by:
#147:
Assisted-by: OpenCode:claude-fable-5.2
ERROR: Unrecognized email address: 'OpenCode:claude-fable-5.2'
#147:
Assisted-by: OpenCode:claude-fable-5.2
total: 1 errors, 1 warnings, 0 checks, 35 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
/home/runner/work/bluetooth-next/bluetooth-next/src/patch/15023607.patch has style problems, please review.
NOTE: Ignored message types: UNKNOWN_COMMIT_ID
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[v7,1/4] Bluetooth: L2CAP: Fix rejecting all Enhanced Credit channels if one is refused
1: T1 Title exceeds max length (87>80): "[v7,1/4] Bluetooth: L2CAP: Fix rejecting all Enhanced Credit channels if one is refused"
[v7,2/4] Bluetooth: L2CAP: Fix leaking the socket of refused Enhanced Credit channels
1: T1 Title exceeds max length (85>80): "[v7,2/4] Bluetooth: L2CAP: Fix leaking the socket of refused Enhanced Credit channels"
##############################
Test: TestRunner_l2cap-tester - FAIL
Desc: Run l2cap-tester with test-runner
Output:
Total: 144, Passed: 143 (99.3%), Failed: 1, Not Run: 0
Failed Test Cases
L2CAP BR/EDR Client SSP - Success 2 Failed 0.016 seconds
https://github.com/bluez/bluetooth-next/pull/1229
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-11-26 3:44 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-25 21:12 [PATCH v7 0/4] L2CAP: Fix channels being established with insufficient security Luiz Augusto von Dentz
2026-11-25 21:12 ` [PATCH v7 1/4] Bluetooth: L2CAP: Fix rejecting all Enhanced Credit channels if one is refused Luiz Augusto von Dentz
2026-11-26 3:44 ` L2CAP: Fix channels being established with insufficient security bluez.test.bot
2026-11-25 21:12 ` [PATCH v7 2/4] Bluetooth: L2CAP: Fix leaking the socket of refused Enhanced Credit channels Luiz Augusto von Dentz
2026-11-25 21:12 ` [PATCH v7 3/4] Bluetooth: L2CAP: Fix accepting channels with insufficient security Luiz Augusto von Dentz
2026-11-25 21:12 ` [PATCH v7 4/4] Bluetooth: L2CAP: Don't offer deferred channels before security is met Luiz Augusto von Dentz
-- strict thread matches above, loose matches on Subject: below --
2026-11-25 18:58 [PATCH v6 1/2] Bluetooth: L2CAP: Fix accepting channels with insufficient security Luiz Augusto von Dentz
2026-11-25 21:26 ` L2CAP: Fix channels being established " bluez.test.bot
2026-11-24 20:50 [PATCH v4 1/2] Bluetooth: L2CAP: Fix accepting channels " Luiz Augusto von Dentz
2026-11-25 2:54 ` L2CAP: Fix channels being established " 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