* [PATCH BlueZ] shared/bap: Report invalid-length ASE CP write via notification
@ 2026-06-09 21:11 Simon Mikuda
2026-06-09 23:02 ` [BlueZ] " bluez.test.bot
2026-06-10 18:40 ` [PATCH BlueZ] " patchwork-bot+bluetooth
0 siblings, 2 replies; 3+ messages in thread
From: Simon Mikuda @ 2026-06-09 21:11 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Simon Mikuda
A zero-length write to the ASE Control Point returned an ATT error, but
ASCS requires the write to succeed at ATT level and the failure to be
carried by a CP notification. Build a response with the truncated error
code and return success instead.
Fixes PTS tests ASCS/SR/SPE/BI-01-C and BI-02-C
---
src/shared/bap.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/shared/bap.c b/src/shared/bap.c
index deb85b264..212d489ff 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -3762,9 +3762,9 @@ static void ascs_ase_cp_write(struct gatt_db_attribute *attrib,
if (!len) {
DBG(bap, "invalid len %u < %u sizeof(*hdr)", len,
sizeof(*hdr));
- gatt_db_attribute_write_result(attrib, id,
- BT_ATT_ERROR_INVALID_ATTRIBUTE_VALUE_LEN);
- return;
+ rsp = ascs_ase_cp_rsp_new(len > 0 ? value[0] : 0x00);
+ ret = BT_ATT_ERROR_INVALID_ATTRIBUTE_VALUE_LEN;
+ goto respond;
}
if (len < sizeof(*hdr)) {
@@ -3829,8 +3829,10 @@ static void ascs_ase_cp_write(struct gatt_db_attribute *attrib,
}
respond:
- if (ret == BT_ATT_ERROR_INVALID_ATTRIBUTE_VALUE_LEN)
+ if (ret == BT_ATT_ERROR_INVALID_ATTRIBUTE_VALUE_LEN) {
ascs_ase_rsp_add_errno(rsp, 0x00, -ENOMSG);
+ ret = 0;
+ }
gatt_db_attribute_notify(attrib, rsp->iov_base, rsp->iov_len, att);
gatt_db_attribute_write_result(attrib, id, ret);
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* RE: [BlueZ] shared/bap: Report invalid-length ASE CP write via notification
2026-06-09 21:11 [PATCH BlueZ] shared/bap: Report invalid-length ASE CP write via notification Simon Mikuda
@ 2026-06-09 23:02 ` bluez.test.bot
2026-06-10 18:40 ` [PATCH BlueZ] " patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2026-06-09 23:02 UTC (permalink / raw)
To: linux-bluetooth, simon.mikuda
[-- Attachment #1: Type: text/plain, Size: 1600 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/project/bluetooth/list/?series=1108823
---Test result---
Test Summary:
CheckPatch PASS 0.34 seconds
GitLint PASS 0.23 seconds
BuildEll PASS 18.69 seconds
BluezMake PASS 685.55 seconds
MakeCheck PASS 12.43 seconds
MakeDistcheck PASS 225.68 seconds
CheckValgrind PASS 256.41 seconds
CheckSmatch WARNING 313.77 seconds
bluezmakeextell PASS 167.62 seconds
IncrementalBuild PASS 619.95 seconds
ScanBuild PASS 919.45 seconds
Details
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
src/shared/bap.c:317:25: warning: array of flexible structuressrc/shared/bap.c: note: in included file:./src/shared/ascs.h:88:25: warning: array of flexible structuressrc/shared/bap.c:317:25: warning: array of flexible structuressrc/shared/bap.c: note: in included file:./src/shared/ascs.h:88:25: warning: array of flexible structuressrc/shared/bap.c:317:25: warning: array of flexible structuressrc/shared/bap.c: note: in included file:./src/shared/ascs.h:88:25: warning: array of flexible structures
https://github.com/bluez/bluez/pull/2207
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH BlueZ] shared/bap: Report invalid-length ASE CP write via notification
2026-06-09 21:11 [PATCH BlueZ] shared/bap: Report invalid-length ASE CP write via notification Simon Mikuda
2026-06-09 23:02 ` [BlueZ] " bluez.test.bot
@ 2026-06-10 18:40 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2026-06-10 18:40 UTC (permalink / raw)
To: Simon Mikuda; +Cc: linux-bluetooth
Hello:
This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Tue, 9 Jun 2026 23:11:04 +0200 you wrote:
> A zero-length write to the ASE Control Point returned an ATT error, but
> ASCS requires the write to succeed at ATT level and the failure to be
> carried by a CP notification. Build a response with the truncated error
> code and return success instead.
>
> Fixes PTS tests ASCS/SR/SPE/BI-01-C and BI-02-C
>
> [...]
Here is the summary with links:
- [BlueZ] shared/bap: Report invalid-length ASE CP write via notification
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=2e00b83c0788
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-10 18:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-09 21:11 [PATCH BlueZ] shared/bap: Report invalid-length ASE CP write via notification Simon Mikuda
2026-06-09 23:02 ` [BlueZ] " bluez.test.bot
2026-06-10 18:40 ` [PATCH BlueZ] " patchwork-bot+bluetooth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox