[PW_SID:1102899] [1/1] Bluetooth: hci_codec: validate capability record length#255
[PW_SID:1102899] [1/1] Bluetooth: hci_codec: validate capability record length#255BluezTestBot wants to merge 1 commit into
Conversation
hci_read_codec_capabilities() validates each capability entry before adding its serialized size to len and advancing the skb. The current check only compares skb->len against caps->len, even though the code consumes the length byte and the payload. Validate the full record size so the cached capability length matches the bytes available in the command response. Fixes: 8961987 ("Bluetooth: Enumerate local supported codec and cache details") Cc: stable@kernel.org Reported-by: Yuan Tan <yuantan098@gmail.com> Reported-by: Zhengchuan Liang <zcliangcn@gmail.com> Reported-by: Xin Liu <bird@lzu.edu.cn> Assisted-by: Codex:GPT-5.4 Signed-off-by: Yuqi Xu <xuyq21@lenovo.com> Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>
|
CheckPatch |
|
VerifyFixes |
|
VerifySignedoff |
|
GitLint |
|
SubjectPrefix |
|
BuildKernel |
|
CheckAllWarning |
|
CheckSparse |
|
BuildKernel32 |
|
TestRunnerSetup |
|
TestRunner_l2cap-tester |
|
TestRunner_iso-tester |
|
TestRunner_bnep-tester |
|
TestRunner_mgmt-tester |
|
TestRunner_rfcomm-tester |
|
TestRunner_sco-tester |
|
TestRunner_ioctl-tester |
|
TestRunner_mesh-tester |
|
TestRunner_smp-tester |
|
TestRunner_userchan-tester |
|
TestRunner_6lowpan-tester |
|
IncrementalBuild |
From: Yuqi Xu xuyq21@lenovo.com
hci_read_codec_capabilities() validates each capability entry before
adding its serialized size to len and advancing the skb.
The current check only compares skb->len against caps->len, even
though the code consumes the length byte and the payload. Validate
the full record size so the cached capability length matches the
bytes available in the command response.
Fixes: 8961987 ("Bluetooth: Enumerate local supported codec and cache details")
Cc: stable@kernel.org
Reported-by: Yuan Tan yuantan098@gmail.com
Reported-by: Zhengchuan Liang zcliangcn@gmail.com
Reported-by: Xin Liu bird@lzu.edu.cn
Assisted-by: Codex:GPT-5.4
Signed-off-by: Yuqi Xu xuyq21@lenovo.com
Signed-off-by: Ren Wei n05ec@lzu.edu.cn
net/bluetooth/hci_codec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)