Message ID | 20240308160715.88478-1-luiz.dentz@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 3d1c16e920c88eb5e583e1b4a10b95a5dc97ec22 |
Headers | show |
Series | [v1] Bluetooth: hci_sync: Fix UAF in hci_acl_create_conn_sync | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/CheckPatch | success | CheckPatch PASS |
tedd_an/GitLint | success | Gitlint PASS |
tedd_an/SubjectPrefix | success | Gitlint PASS |
tedd_an/BuildKernel | success | BuildKernel PASS |
tedd_an/CheckAllWarning | success | CheckAllWarning PASS |
tedd_an/CheckSparse | success | CheckSparse PASS |
tedd_an/CheckSmatch | success | CheckSparse PASS |
tedd_an/BuildKernel32 | success | BuildKernel32 PASS |
tedd_an/TestRunnerSetup | success | TestRunnerSetup PASS |
tedd_an/TestRunner_l2cap-tester | success | TestRunner PASS |
tedd_an/TestRunner_iso-tester | fail | TestRunner_iso-tester: Total: 117, Passed: 116 (99.1%), Failed: 1, Not Run: 0 |
tedd_an/TestRunner_bnep-tester | success | TestRunner PASS |
tedd_an/TestRunner_mgmt-tester | fail | TestRunner_mgmt-tester: Total: 492, Passed: 489 (99.4%), Failed: 1, Not Run: 2 |
tedd_an/TestRunner_rfcomm-tester | success | TestRunner PASS |
tedd_an/TestRunner_sco-tester | success | TestRunner PASS |
tedd_an/TestRunner_ioctl-tester | success | TestRunner PASS |
tedd_an/TestRunner_mesh-tester | success | TestRunner PASS |
tedd_an/TestRunner_smp-tester | success | TestRunner PASS |
tedd_an/TestRunner_userchan-tester | success | TestRunner PASS |
tedd_an/IncrementalBuild | success | Incremental Build PASS |
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=833836 ---Test result--- Test Summary: CheckPatch PASS 0.50 seconds GitLint PASS 0.21 seconds SubjectPrefix PASS 0.06 seconds BuildKernel PASS 28.49 seconds CheckAllWarning PASS 31.21 seconds CheckSparse PASS 36.86 seconds CheckSmatch PASS 100.73 seconds BuildKernel32 PASS 27.56 seconds TestRunnerSetup PASS 524.37 seconds TestRunner_l2cap-tester PASS 20.51 seconds TestRunner_iso-tester FAIL 39.68 seconds TestRunner_bnep-tester PASS 5.02 seconds TestRunner_mgmt-tester FAIL 116.26 seconds TestRunner_rfcomm-tester PASS 7.61 seconds TestRunner_sco-tester PASS 11.25 seconds TestRunner_ioctl-tester PASS 8.13 seconds TestRunner_mesh-tester PASS 6.06 seconds TestRunner_smp-tester PASS 8.09 seconds TestRunner_userchan-tester PASS 5.15 seconds IncrementalBuild PASS 26.60 seconds Details ############################## Test: TestRunner_iso-tester - FAIL Desc: Run iso-tester with test-runner Output: Total: 117, Passed: 116 (99.1%), Failed: 1, Not Run: 0 Failed Test Cases ISO Connect2 Suspend - Success Failed 10.272 seconds ############################## Test: TestRunner_mgmt-tester - FAIL Desc: Run mgmt-tester with test-runner Output: Total: 492, Passed: 489 (99.4%), Failed: 1, Not Run: 2 Failed Test Cases LL Privacy - Add Device 6 (RL is full) Failed 0.198 seconds --- Regards, Linux Bluetooth
Hello: This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>: On Fri, 8 Mar 2024 11:07:15 -0500 you wrote: > From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> > > This fixes the following error caused by hci_conn being freed while > hcy_acl_create_conn_sync is pending: > > ================================================================== > BUG: KASAN: slab-use-after-free in hci_acl_create_conn_sync+0xa7/0x2e0 > Write of size 2 at addr ffff888002ae0036 by task kworker/u3:0/848 > > [...] Here is the summary with links: - [v1] Bluetooth: hci_sync: Fix UAF in hci_acl_create_conn_sync https://git.kernel.org/bluetooth/bluetooth-next/c/3d1c16e920c8 You are awesome, thank you!
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c index 8a3d0d1f7871..f6b662369322 100644 --- a/net/bluetooth/hci_sync.c +++ b/net/bluetooth/hci_sync.c @@ -6709,6 +6709,9 @@ static int hci_acl_create_conn_sync(struct hci_dev *hdev, void *data) struct hci_cp_create_conn cp; int err; + if (!hci_conn_valid(hdev, conn)) + return -ECANCELED; + /* Many controllers disallow HCI Create Connection while it is doing * HCI Inquiry. So we cancel the Inquiry first before issuing HCI Create * Connection. This may cause the MGMT discovering state to become false