Skip to content

[LTS 9.6] bluetooth: CVE-2025-39981, CVE-2025-38117, CVE-2025-40213, CVE-2025-68305, CVE-2026-23151, CVE-2026-31511#1137

Open
pvts-mat wants to merge 9 commits intoctrliq:ciqlts9_6from
pvts-mat:ciqlts9_6-CVE-batch-28
Open

[LTS 9.6] bluetooth: CVE-2025-39981, CVE-2025-38117, CVE-2025-40213, CVE-2025-68305, CVE-2026-23151, CVE-2026-31511#1137
pvts-mat wants to merge 9 commits intoctrliq:ciqlts9_6from
pvts-mat:ciqlts9_6-CVE-batch-28

Conversation

@pvts-mat
Copy link
Copy Markdown
Contributor

@pvts-mat pvts-mat commented Apr 23, 2026

[LTS 9.6]

CVE-2025-39981 VULN-161958
CVE-2025-38117 VULN-162978
CVE-2025-40213 VULN-181745
CVE-2025-68305 VULN-170111
CVE-2026-23151 VULN-176260
CVE-2026-31511 VULN-182134

Solution

Overview

All CVEs in the bunch are related to the bluetooth module. The driving CVE was CVE-2025-39981. Its fixing commit Bluetooth: MGMT: Fix possible UAFs required 3 additional prerequisites, one of which - Bluetooth: MGMT: Protect mgmt_pending list with its own lock - happened to also be the fix for CVE-2025-38117. They both introduced 4 new CVEs: CVE-2025-40213, CVE-2025-68305, CVE-2026-23151, CVE-2026-31511, which were fixed in the included bugfixes. For details refer to Commits relations

Commits

(From the most recent)

Bluetooth: MGMT: Fix dangling pointer on mgmt_add_adv_patterns_monitor_complete

jira VULN-182134
cve CVE-2026-31511
commit-author Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
commit 5f5fa4cd35f707344f65ce9e225b6528691dbbaa
Bluetooth: MGMT: Fix list corruption and UAF in command complete handlers

jira VULN-161958
cve-bf CVE-2025-39981
commit-author Wang Tao <wangtao554@huawei.com>
commit 17f89341cb4281d1da0e2fb0de5406ab7c4e25ef
Bluetooth: MGMT: Fix memory leak in set_ssp_complete

jira VULN-176260
cve CVE-2026-23151
commit-author Jianpeng Chang <jianpeng.chang.cn@windriver.com>
commit 1b9c17fd0a7fdcbe69ec5d6fe8e50bc5ed7f01f2
commit 4db19bfd320f2124c820d3456aeae3953095ea8e

Note that 1b9c17f and 4db19bf are the same change (message + diff) under two distinct commits, somehow both contained in the history of kernel-mainline (see git branch kernel-mainline --contains …). This may lead to confusion, for example 1b9c17f is associated with CVE-2026-23151 while 4db19bf is not. Sometimes it's 1b9c17f which is listed on files history

git log --oneline -- net/bluetooth/mgmt.c

and sometimes it's 4db19bf:

git log --oneline -- net/bluetooth/hci_core.c net/bluetooth/mgmt.c

Included both commits in the meta-data to make sure that the ciqlts9_6 backport can be found no matter which hash was used to search for it.

Bluetooth: hci_sock: Prevent race in socket write iter and sock bind

jira VULN-170111
cve CVE-2025-68305
commit-author Edward Adam Davis <eadavis@qq.com>
commit 89bb613511cc21ed5ba6bddc1c9b9ae9c0dad392
Bluetooth: MGMT: fix crash in set_mesh_sync and set_mesh_complete

jira VULN-181745
cve CVE-2025-40213
commit-author Pauli Virtanen <pav@iki.fi>
commit e8785404de06a69d89dcdd1e9a0b6ea42dc6d327
Bluetooth: MGMT: Fix possible UAFs

jira VULN-161958
cve CVE-2025-39981
commit-author Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
commit 302a1f674c00dd5581ab8e493ef44767c5101aab
Bluetooth: hci_sync: fix set_local_name race condition

jira VULN-161958
cve-pre CVE-2025-39981
commit-author Pavel Shpakovskiy <pashpakovskii@salutedevices.com>
commit 6bbd0d3f0c23fc53c17409dd7476f38ae0ff0cd9
Bluetooth: MGMT: set_mesh: update LE scan interval and window

jira VULN-161958
cve-pre CVE-2025-39981
commit-author Christian Eggers <ceggers@arri.de>
commit e5af67a870f738bb8a4594b6c60c2caf4c87a3c9
Bluetooth: MGMT: Protect mgmt_pending list with its own lock

jira VULN-162978
cve CVE-2025-38117
commit-author Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
commit 6fe26f694c824b8a4dbf50c635bee1302e3f099c
upstream-diff Context conflict resolution due to missing backport of
  276af34d82f13bda0b2a4d9786c90b8bbf1cd064 ("Bluetooth: MGMT: Remove
  unused mgmt_pending_find_data")

Commits relations

The PR includes multiple CVEs and bugfixes which often overlap. To see the inner structure more clearly consult the following table ("Fixes" and "Fixed By" sets reduced to only those commits which are in the PR, (F) - fixing a CVE, (I) - introducing a CVE):

Upstream Subject Fixes Fixed By Cves
5f5fa4c `Bluetooth: MGMT: Fix dangling pointer on mgmt_add_adv_patterns_monitor_complete` 302a1f6 - CVE-2026-31511(F)
17f8934 `Bluetooth: MGMT: Fix list corruption and UAF in command complete handlers` 302a1f6 - -
1b9c17f `Bluetooth: MGMT: Fix memory leak in set_ssp_complete` 302a1f6 - CVE-2026-23151(F)
89bb613 `Bluetooth: hci_sock: Prevent race in socket write iter and sock bind` 6fe26f6 - CVE-2025-68305(F)
e878540 `Bluetooth: MGMT: fix crash in set_mesh_sync and set_mesh_complete` 302a1f6 - CVE-2025-40213(F)
302a1f6 `Bluetooth: MGMT: Fix possible UAFs`   5f5fa4c 17f8934 1b9c17f e878540 CVE-2025-39981(F) CVE-2025-40213(I) CVE-2026-23151(I) CVE-2026-31511(I)
6bbd0d3 `Bluetooth: hci_sync: fix set_local_name race condition` - - -
e5af67a `Bluetooth: MGMT: set_mesh: update LE scan interval and window` - - -
6fe26f6 `Bluetooth: MGMT: Protect mgmt_pending list with its own lock` - 89bb613 CVE-2025-38117(F) CVE-2025-68305(I)

kABI check: passed

[0/1] kabi_check_kernel	Check ABI of kernel [ciqlts9_6-CVE-batch-28]	_kabi_check_kernel__x86_64--test--ciqlts9_6-CVE-batch-28
+ dist_git_version=el-9.6
+ local_version=ciqlts9_6-CVE-batch-28
+ arch=x86_64
+ user=pvts
+ buildmachine=x86_64--build--ciqlts9_6
+ virsh_timeout=600
+ ssh_daemon_wait=20
+ src_dir=/mnt/code/kernel-dist-git-el-9.6
+ build_dir=/mnt/build_files/kernel-src-tree-ciqlts9_6-CVE-batch-28
+ sudo chmod +x /data/src/ctrliq-github-haskell/kernel-dist-git-el-9.6/SOURCES/check-kabi
+ ninja-back/virssh.xsh --max 8 --shutdown-on-success --shutdown-on-failure --timeout 600 --ssh-daemon-wait 20 pvts x86_64--build--ciqlts9_6 ''\''/mnt/code/kernel-dist-git-el-9.6/SOURCES/check-kabi'\'' -k '\''/mnt/code/kernel-dist-git-el-9.6/SOURCES/Module.kabi_x86_64'\'' -s '\''/mnt/build_files/kernel-src-tree-ciqlts9_6-CVE-batch-28/Module.symvers'\'''
kABI check passed
+ touch state/kernels/ciqlts9_6-CVE-batch-28/x86_64/kabi_checked

Boot test: passed

boot-test.log

Kselftests: passed relative

Reference

kselftests–ciqlts9_6–run1.log

Patch

kselftests–ciqlts9_6-CVE-batch-28–run1.log
kselftests–ciqlts9_6-CVE-batch-28–run2.log

Comparison

The tests results for the reference and the patch are the same.

$ ktests.xsh diff  kselftests*.log

Column    File
--------  --------------------------------------------
Status0   kselftests--ciqlts9_6--run1.log
Status1   kselftests--ciqlts9_6-CVE-batch-28--run1.log
Status2   kselftests--ciqlts9_6-CVE-batch-28--run2.log

TestCase                                               Status0  Status1  Status2  Summary
bpf:test_cgroup_storage                                pass     pass     pass     same
bpf:test_lru_map                                       pass     pass     pass     same
bpf:test_sock                                          pass     pass     pass     same
bpf:test_sysctl                                        pass     pass     pass     same
bpf:test_tag                                           pass     pass     pass     same
bpf:test_tcpnotify_user                                fail     fail     fail     same
bpf:test_verifier                                      fail     fail     fail     same
breakpoints:breakpoint_test                            pass     pass     pass     same
capabilities:test_execve                               pass     pass     pass     same
clone3:clone3                                          pass     pass     pass     same
clone3:clone3_cap_checkpoint_restore                   pass     pass     pass     same
clone3:clone3_clear_sighand                            pass     pass     pass     same
clone3:clone3_set_tid                                  pass     pass     pass     same
cpu-hotplug:cpu-on-off-test.sh                         pass     pass     pass     same
cpufreq:main.sh                                        fail     fail     fail     same
drivers/dma-buf:udmabuf                                pass     pass     pass     same
drivers/net/bonding:bond-arp-interval-causes-panic.sh  pass     pass     pass     same
drivers/net/bonding:bond-break-lacpdu-tx.sh            fail     fail     fail     same
drivers/net/bonding:bond-eth-type-change.sh            pass     pass     pass     same
drivers/net/bonding:bond-lladdr-target.sh              pass     pass     pass     same
drivers/net/bonding:bond_options.sh                    fail     fail     fail     same
drivers/net/bonding:dev_addr_lists.sh                  pass     pass     pass     same
drivers/net/bonding:mode-1-recovery-updelay.sh         pass     pass     pass     same
drivers/net/bonding:mode-2-recovery-updelay.sh         pass     pass     pass     same
drivers/net/team:dev_addr_lists.sh                     pass     pass     pass     same
exec:binfmt_script                                     pass     pass     pass     same
exec:execveat                                          pass     pass     pass     same
exec:load_address_16777216                             fail     fail     fail     same
exec:load_address_2097152                              pass     pass     pass     same
exec:load_address_4096                                 pass     pass     pass     same
exec:non-regular                                       fail     fail     fail     same
exec:recursion-depth                                   pass     pass     pass     same
filesystems/binderfs:binderfs_test                     fail     fail     fail     same
filesystems/epoll:epoll_wakeup_test                    pass     pass     pass     same
firmware:fw_run_tests.sh                               skip     skip     skip     same
fpu:run_test_fpu.sh                                    skip     skip     skip     same
fpu:test_fpu                                           pass     pass     pass     same
ftrace:ftracetest                                      pass     pass     pass     same
futex:run.sh                                           pass     pass     pass     same
gpio:gpio-mockup.sh                                    fail     fail     fail     same
intel_pstate:run.sh                                    pass     pass     pass     same
iommu:iommufd                                          fail     fail     fail     same
iommu:iommufd_fail_nth                                 pass     pass     pass     same
ipc:msgque                                             pass     pass     pass     same
ir:ir_loopback.sh                                      skip     skip     skip     same
kcmp:kcmp_test                                         pass     pass     pass     same
kexec:test_kexec_file_load.sh                          skip     skip     skip     same
kexec:test_kexec_load.sh                               skip     skip     skip     same
kvm:access_tracking_perf_test                          pass     pass     pass     same
kvm:amx_test                                           fail     fail     fail     same
kvm:cpuid_test                                         fail     fail     fail     same
kvm:cr4_cpuid_sync_test                                fail     fail     fail     same
kvm:debug_regs                                         fail     fail     fail     same
kvm:demand_paging_test                                 pass     pass     pass     same
kvm:dirty_log_page_splitting_test                      fail     fail     fail     same
kvm:dirty_log_perf_test                                pass     pass     pass     same
kvm:dirty_log_test                                     fail     fail     fail     same
kvm:exit_on_emulation_failure_test                     fail     fail     fail     same
kvm:fix_hypercall_test                                 fail     fail     fail     same
kvm:get_msr_index_features                             fail     fail     fail     same
kvm:guest_memfd_test                                   pass     pass     pass     same
kvm:guest_print_test                                   pass     pass     pass     same
kvm:hardware_disable_test                              pass     pass     pass     same
kvm:hyperv_clock                                       fail     fail     fail     same
kvm:hyperv_cpuid                                       fail     fail     fail     same
kvm:hyperv_evmcs                                       fail     fail     fail     same
kvm:hyperv_extended_hypercalls                         fail     fail     fail     same
kvm:hyperv_features                                    fail     fail     fail     same
kvm:hyperv_ipi                                         fail     fail     fail     same
kvm:hyperv_svm_test                                    fail     fail     fail     same
kvm:hyperv_tlb_flush                                   fail     fail     fail     same
kvm:kvm_binary_stats_test                              pass     pass     pass     same
kvm:kvm_clock_test                                     fail     fail     fail     same
kvm:kvm_create_max_vcpus                               pass     pass     pass     same
kvm:kvm_page_table_test                                pass     pass     pass     same
kvm:kvm_pv_test                                        fail     fail     fail     same
kvm:max_guest_memory_test                              pass     pass     pass     same
kvm:max_vcpuid_cap_test                                fail     fail     fail     same
kvm:memslot_modification_stress_test                   pass     pass     pass     same
kvm:memslot_perf_test                                  pass     pass     pass     same
kvm:mmio_warning_test                                  fail     fail     fail     same
kvm:monitor_mwait_test                                 fail     fail     fail     same
kvm:nested_exceptions_test                             fail     fail     fail     same
kvm:nx_huge_pages_test.sh                              fail     fail     fail     same
kvm:platform_info_test                                 fail     fail     fail     same
kvm:pmu_event_filter_test                              fail     fail     fail     same
kvm:private_mem_conversions_test                       fail     fail     fail     same
kvm:private_mem_kvm_exits_test                         fail     fail     fail     same
kvm:recalc_apic_map_test                               fail     fail     fail     same
kvm:rseq_test                                          fail     fail     fail     same
kvm:set_boot_cpu_id                                    fail     fail     fail     same
kvm:set_memory_region_test                             pass     pass     pass     same
kvm:set_sregs_test                                     fail     fail     fail     same
kvm:sev_migrate_tests                                  fail     fail     fail     same
kvm:smaller_maxphyaddr_emulation_test                  fail     fail     fail     same
kvm:smm_test                                           fail     fail     fail     same
kvm:state_test                                         fail     fail     fail     same
kvm:steal_time                                         pass     pass     pass     same
kvm:svm_int_ctl_test                                   fail     fail     fail     same
kvm:svm_nested_shutdown_test                           fail     fail     fail     same
kvm:svm_nested_soft_inject_test                        fail     fail     fail     same
kvm:svm_vmcall_test                                    fail     fail     fail     same
kvm:sync_regs_test                                     fail     fail     fail     same
kvm:system_counter_offset_test                         pass     pass     pass     same
kvm:triple_fault_event_test                            fail     fail     fail     same
kvm:tsc_msrs_test                                      fail     fail     fail     same
kvm:tsc_scaling_sync                                   fail     fail     fail     same
kvm:ucna_injection_test                                fail     fail     fail     same
kvm:userspace_io_test                                  fail     fail     fail     same
kvm:userspace_msr_exit_test                            fail     fail     fail     same
kvm:vmx_apic_access_test                               fail     fail     fail     same
kvm:vmx_close_while_nested_test                        fail     fail     fail     same
kvm:vmx_dirty_log_test                                 fail     fail     fail     same
kvm:vmx_exception_with_invalid_guest_state             fail     fail     fail     same
kvm:vmx_invalid_nested_guest_state                     fail     fail     fail     same
kvm:vmx_msrs_test                                      fail     fail     fail     same
kvm:vmx_nested_tsc_scaling_test                        fail     fail     fail     same
kvm:vmx_pmu_caps_test                                  fail     fail     fail     same
kvm:vmx_preemption_timer_test                          fail     fail     fail     same
kvm:vmx_set_nested_state_test                          fail     fail     fail     same
kvm:vmx_tsc_adjust_test                                fail     fail     fail     same
kvm:xapic_ipi_test                                     fail     fail     fail     same
kvm:xapic_state_test                                   fail     fail     fail     same
kvm:xcr0_cpuid_test                                    fail     fail     fail     same
kvm:xen_shinfo_test                                    fail     fail     fail     same
kvm:xen_vmcall_test                                    fail     fail     fail     same
kvm:xss_msr_test                                       fail     fail     fail     same
landlock:base_test                                     fail     fail     fail     same
landlock:fs_test                                       fail     fail     fail     same
landlock:ptrace_test                                   pass     pass     pass     same
lib:bitmap.sh                                          skip     skip     skip     same
lib:prime_numbers.sh                                   pass     pass     pass     same
lib:printf.sh                                          skip     skip     skip     same
lib:scanf.sh                                           skip     skip     skip     same
lib:strscpy.sh                                         skip     skip     skip     same
livepatch:test-callbacks.sh                            pass     pass     pass     same
livepatch:test-ftrace.sh                               pass     pass     pass     same
livepatch:test-livepatch.sh                            pass     pass     pass     same
livepatch:test-shadow-vars.sh                          pass     pass     pass     same
livepatch:test-state.sh                                pass     pass     pass     same
livepatch:test-sysfs.sh                                pass     pass     pass     same
membarrier:membarrier_test_multi_thread                pass     pass     pass     same
membarrier:membarrier_test_single_thread               pass     pass     pass     same
memfd:memfd_test                                       pass     pass     pass     same
memfd:run_fuse_test.sh                                 pass     pass     pass     same
memfd:run_hugetlbfs_test.sh                            pass     pass     pass     same
memory-hotplug:mem-on-off-test.sh                      pass     pass     pass     same
mincore:mincore_selftest                               fail     fail     fail     same
mount:run_nosymfollow.sh                               pass     pass     pass     same
mount:run_unprivileged_remount.sh                      pass     pass     pass     same
mqueue:mq_open_tests                                   pass     pass     pass     same
mqueue:mq_perf_tests                                   pass     pass     pass     same
nci:nci_dev                                            fail     fail     fail     same
net/forwarding:bridge_locked_port.sh                   fail     fail     fail     same
net/forwarding:bridge_mdb.sh                           fail     fail     fail     same
net/forwarding:bridge_mdb_host.sh                      pass     pass     pass     same
net/forwarding:bridge_mdb_max.sh                       pass     pass     pass     same
net/forwarding:bridge_mdb_port_down.sh                 pass     pass     pass     same
net/forwarding:bridge_mld.sh                           pass     pass     pass     same
net/forwarding:bridge_port_isolation.sh                fail     fail     fail     same
net/forwarding:bridge_sticky_fdb.sh                    pass     pass     pass     same
net/forwarding:bridge_vlan_aware.sh                    fail     fail     fail     same
net/forwarding:bridge_vlan_mcast.sh                    pass     pass     pass     same
net/forwarding:bridge_vlan_unaware.sh                  fail     fail     fail     same
net/forwarding:custom_multipath_hash.sh                fail     fail     fail     same
net/forwarding:ethtool.sh                              skip     skip     skip     same
net/forwarding:ethtool_extended_state.sh               skip     skip     skip     same
net/forwarding:gre_custom_multipath_hash.sh            fail     fail     fail     same
net/forwarding:gre_inner_v4_multipath.sh               fail     fail     fail     same
net/forwarding:gre_multipath.sh                        fail     fail     fail     same
net/forwarding:gre_multipath_nh.sh                     fail     fail     fail     same
net/forwarding:gre_multipath_nh_res.sh                 fail     fail     fail     same
net/forwarding:hw_stats_l3.sh                          skip     skip     skip     same
net/forwarding:hw_stats_l3_gre.sh                      skip     skip     skip     same
net/forwarding:ip6_forward_instats_vrf.sh              skip     skip     skip     same
net/forwarding:ip6gre_custom_multipath_hash.sh         fail     fail     fail     same
net/forwarding:ip6gre_flat.sh                          fail     fail     fail     same
net/forwarding:ip6gre_flat_key.sh                      fail     fail     fail     same
net/forwarding:ip6gre_flat_keys.sh                     fail     fail     fail     same
net/forwarding:ip6gre_hier.sh                          fail     fail     fail     same
net/forwarding:ip6gre_hier_key.sh                      fail     fail     fail     same
net/forwarding:ip6gre_hier_keys.sh                     fail     fail     fail     same
net/forwarding:ip6gre_inner_v4_multipath.sh            fail     fail     fail     same
net/forwarding:ipip_flat_gre.sh                        fail     fail     fail     same
net/forwarding:ipip_flat_gre_key.sh                    fail     fail     fail     same
net/forwarding:ipip_flat_gre_keys.sh                   fail     fail     fail     same
net/forwarding:ipip_hier_gre.sh                        fail     fail     fail     same
net/forwarding:ipip_hier_gre_key.sh                    fail     fail     fail     same
net/forwarding:local_termination.sh                    skip     skip     skip     same
net/forwarding:loopback.sh                             skip     skip     skip     same
net/forwarding:mirror_gre.sh                           pass     pass     pass     same
net/forwarding:mirror_gre_bound.sh                     pass     pass     pass     same
net/forwarding:mirror_gre_bridge_1d.sh                 pass     pass     pass     same
net/forwarding:mirror_gre_bridge_1q.sh                 pass     pass     pass     same
net/forwarding:mirror_gre_bridge_1q_lag.sh             pass     pass     pass     same
net/forwarding:mirror_gre_changes.sh                   pass     pass     pass     same
net/forwarding:mirror_gre_flower.sh                    pass     pass     pass     same
net/forwarding:mirror_gre_lag_lacp.sh                  pass     pass     pass     same
net/forwarding:mirror_gre_neigh.sh                     pass     pass     pass     same
net/forwarding:mirror_gre_nh.sh                        pass     pass     pass     same
net/forwarding:mirror_gre_vlan.sh                      pass     pass     pass     same
net/forwarding:mirror_vlan.sh                          pass     pass     pass     same
net/forwarding:no_forwarding.sh                        pass     pass     pass     same
net/forwarding:pedit_dsfield.sh                        fail     fail     fail     same
net/forwarding:pedit_ip.sh                             fail     fail     fail     same
net/forwarding:pedit_l4port.sh                         fail     fail     fail     same
net/forwarding:q_in_vni_ipv6.sh                        fail     fail     fail     same
net/forwarding:router.sh                               skip     skip     skip     same
net/forwarding:router_bridge.sh                        fail     fail     fail     same
net/forwarding:router_bridge_1d.sh                     fail     fail     fail     same
net/forwarding:router_bridge_pvid_vlan_upper.sh        fail     fail     fail     same
net/forwarding:router_bridge_vlan.sh                   fail     fail     fail     same
net/forwarding:router_bridge_vlan_upper.sh             fail     fail     fail     same
net/forwarding:router_bridge_vlan_upper_pvid.sh        fail     fail     fail     same
net/forwarding:router_broadcast.sh                     fail     fail     fail     same
net/forwarding:router_mpath_nh.sh                      fail     fail     fail     same
net/forwarding:router_mpath_nh_res.sh                  fail     fail     fail     same
net/forwarding:router_multicast.sh                     skip     skip     skip     same
net/forwarding:router_multipath.sh                     fail     fail     fail     same
net/forwarding:router_nh.sh                            fail     fail     fail     same
net/forwarding:router_vid_1.sh                         fail     fail     fail     same
net/forwarding:skbedit_priority.sh                     fail     fail     fail     same
net/forwarding:tc_chains.sh                            pass     pass     pass     same
net/forwarding:tc_flower.sh                            pass     pass     pass     same
net/forwarding:tc_flower_cfm.sh                        pass     pass     pass     same
net/forwarding:tc_flower_l2_miss.sh                    fail     fail     fail     same
net/forwarding:tc_flower_router.sh                     pass     pass     pass     same
net/forwarding:tc_mpls_l2vpn.sh                        fail     fail     fail     same
net/forwarding:tc_shblocks.sh                          pass     pass     pass     same
net/forwarding:tc_tunnel_key.sh                        pass     pass     pass     same
net/forwarding:tc_vlan_modify.sh                       fail     fail     fail     same
net/forwarding:vxlan_asymmetric.sh                     fail     fail     fail     same
net/forwarding:vxlan_asymmetric_ipv6.sh                fail     fail     fail     same
net/forwarding:vxlan_bridge_1d.sh                      fail     fail     fail     same
net/forwarding:vxlan_bridge_1d_port_8472.sh            fail     fail     fail     same
net/forwarding:vxlan_bridge_1d_port_8472_ipv6.sh       fail     fail     fail     same
net/forwarding:vxlan_bridge_1q.sh                      fail     fail     fail     same
net/forwarding:vxlan_bridge_1q_ipv6.sh                 fail     fail     fail     same
net/forwarding:vxlan_bridge_1q_port_8472.sh            fail     fail     fail     same
net/forwarding:vxlan_bridge_1q_port_8472_ipv6.sh       fail     fail     fail     same
net/forwarding:vxlan_symmetric.sh                      fail     fail     fail     same
net/forwarding:vxlan_symmetric_ipv6.sh                 fail     fail     fail     same
net/hsr:hsr_ping.sh                                    fail     fail     fail     same
net/mptcp:diag.sh                                      pass     pass     pass     same
net/mptcp:mptcp_connect.sh                             pass     pass     pass     same
net/mptcp:mptcp_sockopt.sh                             skip     skip     skip     same
net/mptcp:pm_netlink.sh                                pass     pass     pass     same
net:altnames.sh                                        pass     pass     pass     same
net:bareudp.sh                                         pass     pass     pass     same
net:big_tcp.sh                                         skip     skip     skip     same
net:cmsg_so_mark.sh                                    pass     pass     pass     same
net:devlink_port_split.py                              skip     skip     skip     same
net:drop_monitor_tests.sh                              skip     skip     skip     same
net:fcnal-test.sh                                      skip     skip     skip     same
net:fib-onlink-tests.sh                                pass     pass     pass     same
net:fib_nexthop_multiprefix.sh                         pass     pass     pass     same
net:fib_nexthop_nongw.sh                               pass     pass     pass     same
net:fib_rule_tests.sh                                  pass     pass     pass     same
net:fib_tests.sh                                       fail     fail     fail     same
net:fin_ack_lat.sh                                     pass     pass     pass     same
net:gre_gso.sh                                         pass     pass     pass     same
net:icmp.sh                                            fail     fail     fail     same
net:icmp_redirect.sh                                   pass     pass     pass     same
net:io_uring_zerocopy_tx.sh                            fail     fail     fail     same
net:ip6_gre_headroom.sh                                pass     pass     pass     same
net:ipv6_flowlabel.sh                                  pass     pass     pass     same
net:l2_tos_ttl_inherit.sh                              skip     skip     skip     same
net:l2tp.sh                                            pass     pass     pass     same
net:msg_zerocopy.sh                                    pass     pass     pass     same
net:netdevice.sh                                       pass     pass     pass     same
net:pmtu.sh                                            fail     fail     fail     same
net:psock_snd.sh                                       pass     pass     pass     same
net:reuseaddr_conflict                                 pass     pass     pass     same
net:reuseaddr_ports_exhausted.sh                       pass     pass     pass     same
net:reuseport_bpf                                      pass     pass     pass     same
net:reuseport_bpf_cpu                                  pass     pass     pass     same
net:reuseport_bpf_numa                                 pass     pass     pass     same
net:reuseport_dualstack                                pass     pass     pass     same
net:route_localnet.sh                                  pass     pass     pass     same
net:rps_default_mask.sh                                pass     pass     pass     same
net:rtnetlink.sh                                       skip     skip     skip     same
net:run_afpackettests                                  pass     pass     pass     same
net:run_netsocktests                                   pass     pass     pass     same
net:rxtimestamp.sh                                     pass     pass     pass     same
net:so_txtime.sh                                       pass     pass     pass     same
net:srv6_end_next_csid_l3vpn_test.sh                   pass     pass     pass     same
net:srv6_hencap_red_l3vpn_test.sh                      pass     pass     pass     same
net:srv6_hl2encap_red_l2vpn_test.sh                    pass     pass     pass     same
net:stress_reuseport_listen.sh                         pass     pass     pass     same
net:tcp_fastopen_backup_key.sh                         pass     pass     pass     same
net:test_blackhole_dev.sh                              fail     fail     fail     same
net:test_bpf.sh                                        pass     pass     pass     same
net:test_bridge_neigh_suppress.sh                      skip     skip     skip     same
net:test_vxlan_fdb_changelink.sh                       pass     pass     pass     same
net:test_vxlan_under_vrf.sh                            pass     pass     pass     same
net:tls                                                pass     pass     pass     same
net:traceroute.sh                                      pass     pass     pass     same
net:udpgro.sh                                          fail     fail     fail     same
net:udpgro_bench.sh                                    fail     fail     fail     same
net:udpgso.sh                                          fail     fail     fail     same
net:unicast_extensions.sh                              pass     pass     pass     same
net:veth.sh                                            fail     fail     fail     same
net:vrf-xfrm-tests.sh                                  pass     pass     pass     same
net:vrf_route_leaking.sh                               pass     pass     pass     same
net:vrf_strict_mode_test.sh                            pass     pass     pass     same
netfilter:bridge_brouter.sh                            skip     skip     skip     same
netfilter:conntrack_icmp_related.sh                    skip     skip     skip     same
netfilter:conntrack_tcp_unreplied.sh                   skip     skip     skip     same
netfilter:conntrack_vrf.sh                             skip     skip     skip     same
netfilter:ipvs.sh                                      pass     pass     pass     same
netfilter:nf_nat_edemux.sh                             skip     skip     skip     same
netfilter:nft_audit.sh                                 skip     skip     skip     same
netfilter:nft_concat_range.sh                          fail     fail     fail     same
netfilter:nft_conntrack_helper.sh                      skip     skip     skip     same
netfilter:nft_fib.sh                                   skip     skip     skip     same
netfilter:nft_flowtable.sh                             skip     skip     skip     same
netfilter:nft_meta.sh                                  skip     skip     skip     same
netfilter:nft_nat.sh                                   skip     skip     skip     same
netfilter:nft_queue.sh                                 skip     skip     skip     same
netfilter:rpath.sh                                     skip     skip     skip     same
nsfs:owner                                             pass     pass     pass     same
nsfs:pidns                                             pass     pass     pass     same
pid_namespace:regression_enomem                        pass     pass     pass     same
pidfd:pidfd_fdinfo_test                                pass     pass     pass     same
pidfd:pidfd_getfd_test                                 pass     pass     pass     same
pidfd:pidfd_open_test                                  pass     pass     pass     same
pidfd:pidfd_poll_test                                  pass     pass     pass     same
pidfd:pidfd_setns_test                                 pass     pass     pass     same
pidfd:pidfd_test                                       pass     pass     pass     same
pidfd:pidfd_wait                                       pass     pass     pass     same
proc:fd-001-lookup                                     pass     pass     pass     same
proc:fd-002-posix-eq                                   pass     pass     pass     same
proc:fd-003-kthread                                    pass     pass     pass     same
proc:proc-fsconfig-hidepid                             pass     pass     pass     same
proc:proc-loadavg-001                                  pass     pass     pass     same
proc:proc-multiple-procfs                              pass     pass     pass     same
proc:proc-self-map-files-001                           pass     pass     pass     same
proc:proc-self-map-files-002                           pass     pass     pass     same
proc:proc-self-syscall                                 pass     pass     pass     same
proc:proc-self-wchan                                   pass     pass     pass     same
proc:proc-subset-pid                                   pass     pass     pass     same
proc:proc-uptime-002                                   pass     pass     pass     same
proc:read                                              pass     pass     pass     same
proc:self                                              pass     pass     pass     same
proc:setns-dcache                                      pass     pass     pass     same
proc:setns-sysvipc                                     pass     pass     pass     same
proc:thread-self                                       pass     pass     pass     same
pstore:pstore_post_reboot_tests                        skip     skip     skip     same
pstore:pstore_tests                                    fail     fail     fail     same
ptrace:get_syscall_info                                pass     pass     pass     same
ptrace:peeksiginfo                                     pass     pass     pass     same
ptrace:vmaccess                                        fail     fail     fail     same
rlimits:rlimits-per-userns                             pass     pass     pass     same
rseq:basic_percpu_ops_test                             pass     pass     pass     same
rseq:basic_test                                        pass     pass     pass     same
rseq:param_test                                        pass     pass     pass     same
rseq:param_test_benchmark                              pass     pass     pass     same
rseq:param_test_compare_twice                          pass     pass     pass     same
rseq:run_param_test.sh                                 pass     pass     pass     same
seccomp:seccomp_benchmark                              pass     pass     pass     same
seccomp:seccomp_bpf                                    pass     pass     pass     same
sgx:test_sgx                                           fail     fail     fail     same
sigaltstack:sas                                        pass     pass     pass     same
size:get_size                                          pass     pass     pass     same
splice:default_file_splice_read.sh                     pass     pass     pass     same
splice:short_splice_read.sh                            fail     fail     fail     same
static_keys:test_static_keys.sh                        skip     skip     skip     same
syscall_user_dispatch:sud_benchmark                    pass     pass     pass     same
syscall_user_dispatch:sud_test                         pass     pass     pass     same
tc-testing:tdc.sh                                      fail     fail     fail     same
tdx:tdx_guest_test                                     fail     fail     fail     same
timens:clock_nanosleep                                 pass     pass     pass     same
timens:exec                                            pass     pass     pass     same
timens:futex                                           pass     pass     pass     same
timens:procfs                                          pass     pass     pass     same
timens:timens                                          pass     pass     pass     same
timens:timer                                           pass     pass     pass     same
timens:timerfd                                         pass     pass     pass     same
timens:vfork_exec                                      pass     pass     pass     same
timers:inconsistency-check                             pass     pass     pass     same
timers:mqueue-lat                                      pass     pass     pass     same
timers:nanosleep                                       pass     pass     pass     same
timers:nsleep-lat                                      pass     pass     pass     same
timers:posix_timers                                    pass     pass     pass     same
timers:rtcpie                                          pass     pass     pass     same
timers:set-timer-lat                                   pass     pass     pass     same
timers:threadtest                                      pass     pass     pass     same
tmpfs:bug-link-o-tmpfile                               pass     pass     pass     same
tpm2:test_smoke.sh                                     skip     skip     skip     same
tpm2:test_space.sh                                     skip     skip     skip     same
tty:tty_tstamp_update                                  skip     skip     skip     same
vDSO:vdso_standalone_test_x86                          pass     pass     pass     same
vDSO:vdso_test_abi                                     pass     pass     pass     same
vDSO:vdso_test_clock_getres                            pass     pass     pass     same
vDSO:vdso_test_correctness                             pass     pass     pass     same
vDSO:vdso_test_getcpu                                  pass     pass     pass     same
vDSO:vdso_test_gettimeofday                            pass     pass     pass     same
x86:amx_64                                             fail     fail     fail     same
x86:check_initial_reg_state_64                         fail     fail     fail     same
x86:corrupt_xstate_header_64                           fail     fail     fail     same
x86:fsgsbase_64                                        fail     fail     fail     same
x86:fsgsbase_restore_64                                fail     fail     fail     same
x86:ioperm_64                                          fail     fail     fail     same
x86:iopl_64                                            fail     fail     fail     same
x86:lam_64                                             fail     fail     fail     same
x86:mov_ss_trap_64                                     fail     fail     fail     same
x86:sigaltstack_64                                     fail     fail     fail     same
x86:sigreturn_64                                       fail     fail     fail     same
x86:single_step_syscall_64                             fail     fail     fail     same
x86:syscall_arg_fault_64                               fail     fail     fail     same
x86:syscall_nt_64                                      fail     fail     fail     same
x86:syscall_numbering_64                               fail     fail     fail     same
x86:sysret_rip_64                                      fail     fail     fail     same
x86:sysret_ss_attrs_64                                 fail     fail     fail     same
x86:test_mremap_vdso_64                                fail     fail     fail     same
x86:test_vsyscall_64                                   fail     fail     fail     same
zram:zram.sh                                           pass     pass     pass     same

@github-actions
Copy link
Copy Markdown

🤖 Validation Checks In Progress Workflow run: https://github.com/ctrliq/kernel-src-tree/actions/runs/24863287876

@github-actions
Copy link
Copy Markdown

🔍 Upstream Linux Kernel Commit Check

  • ❌ PR commit 876e011544d (Bluetooth: MGMT: Fix memory leak in set_ssp_complete) references CVE-2026-23151 but
    upstream commit 4db19bfd320f has no CVE assigned

  • ⚠️ PR commit 07616323ad5 (Bluetooth: MGMT: Fix dangling pointer on mgmt_add_adv_patterns_monitor_complete) does not reference a CVE but
    upstream commit 5f5fa4cd35f7 is associated with CVE-2026-31511

This is an automated message from the kernel commit checker workflow.

@github-actions
Copy link
Copy Markdown

🔍 Interdiff Analysis

  • ⚠️ PR commit dbf013eb375 (Bluetooth: MGMT: Protect mgmt_pending list with its own lock) → upstream 6fe26f694c82
    Differences found:
################################################################################
!    REJECTED PATCH2 HUNKS - could not be compared; manual review needed       !
################################################################################

--- b/net/bluetooth/mgmt_util.h
+++ b/net/bluetooth/mgmt_util.h
@@ -54,7 +54,7 @@
 
 struct mgmt_pending_cmd *mgmt_pending_find(unsigned short channel, u16 opcode,
 					   struct hci_dev *hdev);
-void mgmt_pending_foreach(u16 opcode, struct hci_dev *hdev,
+void mgmt_pending_foreach(u16 opcode, struct hci_dev *hdev, bool remove,
 			  void (*cb)(struct mgmt_pending_cmd *cmd, void *data),
 			  void *data);
 struct mgmt_pending_cmd *mgmt_pending_add(struct sock *sk, u16 opcode,

================================================================================
*    CONTEXT DIFFERENCES - surrounding code differences between the patches    *
================================================================================

--- b/net/bluetooth/mgmt_util.h
+++ b/net/bluetooth/mgmt_util.h
@@ -51,6 +51,6 @@
-						u16 opcode,
-						struct hci_dev *hdev,
-						const void *data);
+
+struct mgmt_pending_cmd *mgmt_pending_find(unsigned short channel, u16 opcode,
+					   struct hci_dev *hdev);
 void mgmt_pending_foreach(u16 opcode, struct hci_dev *hdev,
 			  void (*cb)(struct mgmt_pending_cmd *cmd, void *data),
 			  void *data);

This is an automated interdiff check for backported commits.

@github-actions
Copy link
Copy Markdown

JIRA PR Check Results

9 commit(s) with issues found:

Commit 07616323ad51

Summary: Bluetooth: MGMT: Fix dangling pointer on mgmt_add_adv_patterns_monitor_complete

❌ Errors:

  • VULN-161958: Status is 'To Do', expected 'In Progress'

⚠️ Warnings:

  • VULN-161958: No time logged - please log time manually

Commit b43bc68ff5be

Summary: Bluetooth: MGMT: Fix list corruption and UAF in command complete handlers

❌ Errors:

  • VULN-161958: Status is 'To Do', expected 'In Progress'

⚠️ Warnings:

  • VULN-161958: No time logged - please log time manually

Commit 876e011544d6

Summary: Bluetooth: MGMT: Fix memory leak in set_ssp_complete

❌ Errors:

  • VULN-176260: Status is 'To Do', expected 'In Progress'

⚠️ Warnings:

  • VULN-176260: No time logged - please log time manually

Commit 27eb343237d0

Summary: Bluetooth: hci_sock: Prevent race in socket write iter and sock bind

❌ Errors:

  • VULN-170111: Status is 'To Do', expected 'In Progress'

⚠️ Warnings:

  • VULN-170111: No time logged - please log time manually

Commit 9ffead92be6e

Summary: Bluetooth: MGMT: fix crash in set_mesh_sync and set_mesh_complete

❌ Errors:

  • VULN-181745: Status is 'To Do', expected 'In Progress'

⚠️ Warnings:

  • VULN-181745: No time logged - please log time manually

Commit e8dd6d18bbcf

Summary: Bluetooth: MGMT: Fix possible UAFs

❌ Errors:

  • VULN-161958: Status is 'To Do', expected 'In Progress'

⚠️ Warnings:

  • VULN-161958: No time logged - please log time manually

Commit 78cee4a56b4e

Summary: Bluetooth: hci_sync: fix set_local_name race condition

❌ Errors:

  • VULN-161958: Status is 'To Do', expected 'In Progress'

⚠️ Warnings:

  • VULN-161958: No time logged - please log time manually

Commit 350977743725

Summary: Bluetooth: MGMT: set_mesh: update LE scan interval and window

❌ Errors:

  • VULN-161958: Status is 'To Do', expected 'In Progress'

⚠️ Warnings:

  • VULN-161958: No time logged - please log time manually

Commit dbf013eb375f

Summary: Bluetooth: MGMT: Protect mgmt_pending list with its own lock

❌ Errors:

  • VULN-162978: Status is 'To Do', expected 'In Progress'

⚠️ Warnings:

  • VULN-162978: No time logged - please log time manually

Summary: Checked 9 commit(s) total.

@github-actions
Copy link
Copy Markdown

Validation checks completed with issues View full results: https://github.com/ctrliq/kernel-src-tree/actions/runs/24863287876

@pvts-mat
Copy link
Copy Markdown
Contributor Author

🔍 Upstream Linux Kernel Commit Check

* ❌ PR commit `876e011544d (Bluetooth: MGMT: Fix memory leak in set_ssp_complete)` references `CVE-2026-23151` but
  upstream commit `4db19bfd320f` has no CVE assigned

Issue addressed in the PR description.

* ⚠️ PR commit `07616323ad5 (Bluetooth: MGMT: Fix dangling pointer on mgmt_add_adv_patterns_monitor_complete)` does not reference a CVE but
  upstream commit `5f5fa4cd35f7` is associated with `CVE-2026-31511`

Missed this one, will fix

@pvts-mat pvts-mat force-pushed the ciqlts9_6-CVE-batch-28 branch from 0761632 to 4c216f8 Compare April 24, 2026 14:17
@pvts-mat pvts-mat changed the title [LTS 9.6] bluetooth: CVE-2025-39981, CVE-2025-38117, CVE-2025-40213, CVE-2025-68305, CVE-2026-23151 [LTS 9.6] bluetooth: CVE-2025-39981, CVE-2025-38117, CVE-2025-40213, CVE-2025-68305, CVE-2026-23151, CVE-2026-31511 Apr 24, 2026
jira VULN-162978
cve CVE-2025-38117
commit-author Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
commit 6fe26f6
upstream-diff Context conflict resolution due to missing backport of
  276af34 ("Bluetooth: MGMT: Remove
  unused mgmt_pending_find_data")

This uses a mutex to protect from concurrent access of mgmt_pending
list which can cause crashes like:

==================================================================
BUG: KASAN: slab-use-after-free in hci_sock_get_channel+0x60/0x68 net/bluetooth/hci_sock.c:91
Read of size 2 at addr ffff0000c48885b2 by task syz.4.334/7318

CPU: 0 UID: 0 PID: 7318 Comm: syz.4.334 Not tainted 6.15.0-rc7-syzkaller-g187899f4124a #0 PREEMPT
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
Call trace:
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:466 (C)
 __dump_stack+0x30/0x40 lib/dump_stack.c:94
 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120
 print_address_description+0xa8/0x254 mm/kasan/report.c:408
 print_report+0x68/0x84 mm/kasan/report.c:521
 kasan_report+0xb0/0x110 mm/kasan/report.c:634
 __asan_report_load2_noabort+0x20/0x2c mm/kasan/report_generic.c:379
 hci_sock_get_channel+0x60/0x68 net/bluetooth/hci_sock.c:91
 mgmt_pending_find+0x7c/0x140 net/bluetooth/mgmt_util.c:223
 pending_find net/bluetooth/mgmt.c:947 [inline]
 remove_adv_monitor+0x44/0x1a4 net/bluetooth/mgmt.c:5445
 hci_mgmt_cmd+0x780/0xc00 net/bluetooth/hci_sock.c:1712
 hci_sock_sendmsg+0x544/0xbb0 net/bluetooth/hci_sock.c:1832
 sock_sendmsg_nosec net/socket.c:712 [inline]
 __sock_sendmsg net/socket.c:727 [inline]
 sock_write_iter+0x25c/0x378 net/socket.c:1131
 new_sync_write fs/read_write.c:591 [inline]
 vfs_write+0x62c/0x97c fs/read_write.c:684
 ksys_write+0x120/0x210 fs/read_write.c:736
 __do_sys_write fs/read_write.c:747 [inline]
 __se_sys_write fs/read_write.c:744 [inline]
 __arm64_sys_write+0x7c/0x90 fs/read_write.c:744
 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151
 el0_svc+0x58/0x17c arch/arm64/kernel/entry-common.c:767
 el0t_64_sync_handler+0x78/0x108 arch/arm64/kernel/entry-common.c:786
 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600

Allocated by task 7037:
 kasan_save_stack mm/kasan/common.c:47 [inline]
 kasan_save_track+0x40/0x78 mm/kasan/common.c:68
 kasan_save_alloc_info+0x44/0x54 mm/kasan/generic.c:562
 poison_kmalloc_redzone mm/kasan/common.c:377 [inline]
 __kasan_kmalloc+0x9c/0xb4 mm/kasan/common.c:394
 kasan_kmalloc include/linux/kasan.h:260 [inline]
 __do_kmalloc_node mm/slub.c:4327 [inline]
 __kmalloc_noprof+0x2fc/0x4c8 mm/slub.c:4339
 kmalloc_noprof include/linux/slab.h:909 [inline]
 sk_prot_alloc+0xc4/0x1f0 net/core/sock.c:2198
 sk_alloc+0x44/0x3ac net/core/sock.c:2254
 bt_sock_alloc+0x4c/0x300 net/bluetooth/af_bluetooth.c:148
 hci_sock_create+0xa8/0x194 net/bluetooth/hci_sock.c:2202
 bt_sock_create+0x14c/0x24c net/bluetooth/af_bluetooth.c:132
 __sock_create+0x43c/0x91c net/socket.c:1541
 sock_create net/socket.c:1599 [inline]
 __sys_socket_create net/socket.c:1636 [inline]
 __sys_socket+0xd4/0x1c0 net/socket.c:1683
 __do_sys_socket net/socket.c:1697 [inline]
 __se_sys_socket net/socket.c:1695 [inline]
 __arm64_sys_socket+0x7c/0x94 net/socket.c:1695
 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151
 el0_svc+0x58/0x17c arch/arm64/kernel/entry-common.c:767
 el0t_64_sync_handler+0x78/0x108 arch/arm64/kernel/entry-common.c:786
 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600

Freed by task 6607:
 kasan_save_stack mm/kasan/common.c:47 [inline]
 kasan_save_track+0x40/0x78 mm/kasan/common.c:68
 kasan_save_free_info+0x58/0x70 mm/kasan/generic.c:576
 poison_slab_object mm/kasan/common.c:247 [inline]
 __kasan_slab_free+0x68/0x88 mm/kasan/common.c:264
 kasan_slab_free include/linux/kasan.h:233 [inline]
 slab_free_hook mm/slub.c:2380 [inline]
 slab_free mm/slub.c:4642 [inline]
 kfree+0x17c/0x474 mm/slub.c:4841
 sk_prot_free net/core/sock.c:2237 [inline]
 __sk_destruct+0x4f4/0x760 net/core/sock.c:2332
 sk_destruct net/core/sock.c:2360 [inline]
 __sk_free+0x320/0x430 net/core/sock.c:2371
 sk_free+0x60/0xc8 net/core/sock.c:2382
 sock_put include/net/sock.h:1944 [inline]
 mgmt_pending_free+0x88/0x118 net/bluetooth/mgmt_util.c:290
 mgmt_pending_remove+0xec/0x104 net/bluetooth/mgmt_util.c:298
 mgmt_set_powered_complete+0x418/0x5cc net/bluetooth/mgmt.c:1355
 hci_cmd_sync_work+0x204/0x33c net/bluetooth/hci_sync.c:334
 process_one_work+0x7e8/0x156c kernel/workqueue.c:3238
 process_scheduled_works kernel/workqueue.c:3319 [inline]
 worker_thread+0x958/0xed8 kernel/workqueue.c:3400
 kthread+0x5fc/0x75c kernel/kthread.c:464
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:847

Fixes: a380b6c ("Bluetooth: Add generic mgmt helper API")
Closes: https://syzkaller.appspot.com/bug?extid=0a7039d5d9986ff4ecec
Closes: https://syzkaller.appspot.com/bug?extid=cc0cc52e7f43dc9e6df1
	Reported-by: syzbot+0a7039d5d9986ff4ecec@syzkaller.appspotmail.com
	Tested-by: syzbot+0a7039d5d9986ff4ecec@syzkaller.appspotmail.com
	Tested-by: syzbot+cc0cc52e7f43dc9e6df1@syzkaller.appspotmail.com
	Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
	Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
(cherry picked from commit 6fe26f6)
	Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>
jira VULN-161958
cve-pre CVE-2025-39981
commit-author Christian Eggers <ceggers@arri.de>
commit e5af67a

According to the message of commit b338d91 ("Bluetooth: Implement
support for Mesh"), MGMT_OP_SET_MESH_RECEIVER should set the passive scan
parameters.  Currently the scan interval and window parameters are
silently ignored, although user space (bluetooth-meshd) expects that
they can be used [1]

[1] https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/mesh/mesh-io-mgmt.c#n344
Fixes: b338d91 ("Bluetooth: Implement support for Mesh")
	Cc: stable@vger.kernel.org
	Signed-off-by: Christian Eggers <ceggers@arri.de>
	Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
(cherry picked from commit e5af67a)
	Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>
jira VULN-161958
cve-pre CVE-2025-39981
commit-author Pavel Shpakovskiy <pashpakovskii@salutedevices.com>
commit 6bbd0d3

Function set_name_sync() uses hdev->dev_name field to send
HCI_OP_WRITE_LOCAL_NAME command, but copying from data to hdev->dev_name
is called after mgmt cmd was queued, so it is possible that function
set_name_sync() will read old name value.

This change adds name as a parameter for function hci_update_name_sync()
to avoid race condition.

Fixes: 6f6ff38 ("Bluetooth: hci_sync: Convert MGMT_OP_SET_LOCAL_NAME")
	Signed-off-by: Pavel Shpakovskiy <pashpakovskii@salutedevices.com>
	Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
	Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
(cherry picked from commit 6bbd0d3)
	Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>
jira VULN-161958
cve CVE-2025-39981
commit-author Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
commit 302a1f6

This attemps to fix possible UAFs caused by struct mgmt_pending being
freed while still being processed like in the following trace, in order
to fix mgmt_pending_valid is introduce and use to check if the
mgmt_pending hasn't been removed from the pending list, on the complete
callbacks it is used to check and in addtion remove the cmd from the list
while holding mgmt_pending_lock to avoid TOCTOU problems since if the cmd
is left on the list it can still be accessed and freed.

BUG: KASAN: slab-use-after-free in mgmt_add_adv_patterns_monitor_sync+0x35/0x50 net/bluetooth/mgmt.c:5223
Read of size 8 at addr ffff8880709d4dc0 by task kworker/u11:0/55

CPU: 0 UID: 0 PID: 55 Comm: kworker/u11:0 Not tainted 6.16.4 ctrliq#2 PREEMPT(full)
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014
Workqueue: hci0 hci_cmd_sync_work
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:378 [inline]
 print_report+0xca/0x240 mm/kasan/report.c:482
 kasan_report+0x118/0x150 mm/kasan/report.c:595
 mgmt_add_adv_patterns_monitor_sync+0x35/0x50 net/bluetooth/mgmt.c:5223
 hci_cmd_sync_work+0x210/0x3a0 net/bluetooth/hci_sync.c:332
 process_one_work kernel/workqueue.c:3238 [inline]
 process_scheduled_works+0xade/0x17b0 kernel/workqueue.c:3321
 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402
 kthread+0x711/0x8a0 kernel/kthread.c:464
 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148
 ret_from_fork_asm+0x1a/0x30 home/kwqcheii/source/fuzzing/kernel/kasan/linux-6.16.4/arch/x86/entry/entry_64.S:245
 </TASK>

Allocated by task 12210:
 kasan_save_stack mm/kasan/common.c:47 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:68
 poison_kmalloc_redzone mm/kasan/common.c:377 [inline]
 __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:394
 kasan_kmalloc include/linux/kasan.h:260 [inline]
 __kmalloc_cache_noprof+0x230/0x3d0 mm/slub.c:4364
 kmalloc_noprof include/linux/slab.h:905 [inline]
 kzalloc_noprof include/linux/slab.h:1039 [inline]
 mgmt_pending_new+0x65/0x1e0 net/bluetooth/mgmt_util.c:269
 mgmt_pending_add+0x35/0x140 net/bluetooth/mgmt_util.c:296
 __add_adv_patterns_monitor+0x130/0x200 net/bluetooth/mgmt.c:5247
 add_adv_patterns_monitor+0x214/0x360 net/bluetooth/mgmt.c:5364
 hci_mgmt_cmd+0x9c9/0xef0 net/bluetooth/hci_sock.c:1719
 hci_sock_sendmsg+0x6ca/0xef0 net/bluetooth/hci_sock.c:1839
 sock_sendmsg_nosec net/socket.c:714 [inline]
 __sock_sendmsg+0x219/0x270 net/socket.c:729
 sock_write_iter+0x258/0x330 net/socket.c:1133
 new_sync_write fs/read_write.c:593 [inline]
 vfs_write+0x5c9/0xb30 fs/read_write.c:686
 ksys_write+0x145/0x250 fs/read_write.c:738
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 12221:
 kasan_save_stack mm/kasan/common.c:47 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:68
 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576
 poison_slab_object mm/kasan/common.c:247 [inline]
 __kasan_slab_free+0x62/0x70 mm/kasan/common.c:264
 kasan_slab_free include/linux/kasan.h:233 [inline]
 slab_free_hook mm/slub.c:2381 [inline]
 slab_free mm/slub.c:4648 [inline]
 kfree+0x18e/0x440 mm/slub.c:4847
 mgmt_pending_free net/bluetooth/mgmt_util.c:311 [inline]
 mgmt_pending_foreach+0x30d/0x380 net/bluetooth/mgmt_util.c:257
 __mgmt_power_off+0x169/0x350 net/bluetooth/mgmt.c:9444
 hci_dev_close_sync+0x754/0x1330 net/bluetooth/hci_sync.c:5290
 hci_dev_do_close net/bluetooth/hci_core.c:501 [inline]
 hci_dev_close+0x108/0x200 net/bluetooth/hci_core.c:526
 sock_do_ioctl+0xd9/0x300 net/socket.c:1192
 sock_ioctl+0x576/0x790 net/socket.c:1313
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:907 [inline]
 __se_sys_ioctl+0xf9/0x170 fs/ioctl.c:893
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Fixes: cf75ad8 ("Bluetooth: hci_sync: Convert MGMT_SET_POWERED")
Fixes: 2bd1b23 ("Bluetooth: hci_sync: Convert MGMT_OP_SET_DISCOVERABLE to use cmd_sync")
Fixes: f056a65 ("Bluetooth: hci_sync: Convert MGMT_OP_SET_CONNECTABLE to use cmd_sync")
Fixes: 3244845 ("Bluetooth: hci_sync: Convert MGMT_OP_SSP")
Fixes: d81a494 ("Bluetooth: hci_sync: Convert MGMT_OP_SET_LE")
Fixes: b338d91 ("Bluetooth: Implement support for Mesh")
Fixes: 6f6ff38 ("Bluetooth: hci_sync: Convert MGMT_OP_SET_LOCAL_NAME")
Fixes: 71efbb0 ("Bluetooth: hci_sync: Convert MGMT_OP_SET_PHY_CONFIGURATION")
Fixes: b747a83 ("Bluetooth: hci_sync: Refactor add Adv Monitor")
Fixes: abfeea4 ("Bluetooth: hci_sync: Convert MGMT_OP_START_DISCOVERY")
Fixes: 26ac4c5 ("Bluetooth: hci_sync: Convert MGMT_OP_SET_ADVERTISING")
	Reported-by: cen zhang <zzzccc427@gmail.com>
	Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
(cherry picked from commit 302a1f6)
	Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>
jira VULN-181745
cve CVE-2025-40213
commit-author Pauli Virtanen <pav@iki.fi>
commit e878540

There is a BUG: KASAN: stack-out-of-bounds in set_mesh_sync due to
memcpy from badly declared on-stack flexible array.

Another crash is in set_mesh_complete() due to double list_del via
mgmt_pending_valid + mgmt_pending_remove.

Use DEFINE_FLEX to declare the flexible array right, and don't memcpy
outside bounds.

As mgmt_pending_valid removes the cmd from list, use mgmt_pending_free,
and also report status on error.

Fixes: 302a1f6 ("Bluetooth: MGMT: Fix possible UAFs")
	Signed-off-by: Pauli Virtanen <pav@iki.fi>
	Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
	Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
(cherry picked from commit e878540)
	Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>
jira VULN-170111
cve CVE-2025-68305
commit-author Edward Adam Davis <eadavis@qq.com>
commit 89bb613

There is a potential race condition between sock bind and socket write
iter. bind may free the same cmd via mgmt_pending before write iter sends
the cmd, just as syzbot reported in UAF[1].

Here we use hci_dev_lock to synchronize the two, thereby avoiding the
UAF mentioned in [1].

[1]
syzbot reported:
BUG: KASAN: slab-use-after-free in mgmt_pending_remove+0x3b/0x210 net/bluetooth/mgmt_util.c:316
Read of size 8 at addr ffff888077164818 by task syz.0.17/5989
Call Trace:
 mgmt_pending_remove+0x3b/0x210 net/bluetooth/mgmt_util.c:316
 set_link_security+0x5c2/0x710 net/bluetooth/mgmt.c:1918
 hci_mgmt_cmd+0x9c9/0xef0 net/bluetooth/hci_sock.c:1719
 hci_sock_sendmsg+0x6ca/0xef0 net/bluetooth/hci_sock.c:1839
 sock_sendmsg_nosec net/socket.c:727 [inline]
 __sock_sendmsg+0x21c/0x270 net/socket.c:742
 sock_write_iter+0x279/0x360 net/socket.c:1195

Allocated by task 5989:
 mgmt_pending_add+0x35/0x140 net/bluetooth/mgmt_util.c:296
 set_link_security+0x557/0x710 net/bluetooth/mgmt.c:1910
 hci_mgmt_cmd+0x9c9/0xef0 net/bluetooth/hci_sock.c:1719
 hci_sock_sendmsg+0x6ca/0xef0 net/bluetooth/hci_sock.c:1839
 sock_sendmsg_nosec net/socket.c:727 [inline]
 __sock_sendmsg+0x21c/0x270 net/socket.c:742
 sock_write_iter+0x279/0x360 net/socket.c:1195

Freed by task 5991:
 mgmt_pending_free net/bluetooth/mgmt_util.c:311 [inline]
 mgmt_pending_foreach+0x30d/0x380 net/bluetooth/mgmt_util.c:257
 mgmt_index_removed+0x112/0x2f0 net/bluetooth/mgmt.c:9477
 hci_sock_bind+0xbe9/0x1000 net/bluetooth/hci_sock.c:1314

Fixes: 6fe26f6 ("Bluetooth: MGMT: Protect mgmt_pending list with its own lock")
	Reported-by: syzbot+9aa47cd4633a3cf92a80@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=9aa47cd4633a3cf92a80
	Tested-by: syzbot+9aa47cd4633a3cf92a80@syzkaller.appspotmail.com
	Signed-off-by: Edward Adam Davis <eadavis@qq.com>
	Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
(cherry picked from commit 89bb613)
	Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>
jira VULN-176260
cve CVE-2026-23151
commit-author Jianpeng Chang <jianpeng.chang.cn@windriver.com>
commit 1b9c17f
commit 4db19bf

Fix memory leak in set_ssp_complete() where mgmt_pending_cmd structures
are not freed after being removed from the pending list.

Commit 302a1f6 ("Bluetooth: MGMT: Fix possible UAFs") replaced
mgmt_pending_foreach() calls with individual command handling but missed
adding mgmt_pending_free() calls in both error and success paths of
set_ssp_complete(). Other completion functions like set_le_complete()
were fixed correctly in the same commit.

This causes a memory leak of the mgmt_pending_cmd structure and its
associated parameter data for each SSP command that completes.

Add the missing mgmt_pending_free(cmd) calls in both code paths to fix
the memory leak. Also fix the same issue in set_advertising_complete().

Fixes: 302a1f6 ("Bluetooth: MGMT: Fix possible UAFs")
	Signed-off-by: Jianpeng Chang <jianpeng.chang.cn@windriver.com>
	Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
(cherry picked from commit 1b9c17f)
	Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>
…lers

jira VULN-161958
cve-bf CVE-2025-39981
commit-author Wang Tao <wangtao554@huawei.com>
commit 17f8934

Commit 302a1f6 ("Bluetooth: MGMT: Fix possible UAFs") introduced
mgmt_pending_valid(), which not only validates the pending command but
also unlinks it from the pending list if it is valid. This change in
semantics requires updates to several completion handlers to avoid list
corruption and memory safety issues.

This patch addresses two left-over issues from the aforementioned rework:

1. In mgmt_add_adv_patterns_monitor_complete(), mgmt_pending_remove()
is replaced with mgmt_pending_free() in the success path. Since
mgmt_pending_valid() already unlinks the command at the beginning of
the function, calling mgmt_pending_remove() leads to a double list_del()
and subsequent list corruption/kernel panic.

2. In set_mesh_complete(), the use of mgmt_pending_foreach() in the error
path is removed. Since the current command is already unlinked by
mgmt_pending_valid(), this foreach loop would incorrectly target other
pending mesh commands, potentially freeing them while they are still being
processed concurrently (leading to UAFs). The redundant mgmt_cmd_status()
is also simplified to use cmd->opcode directly.

Fixes: 302a1f6 ("Bluetooth: MGMT: Fix possible UAFs")
	Signed-off-by: Wang Tao <wangtao554@huawei.com>
	Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
(cherry picked from commit 17f8934)
	Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>
…r_complete

jira VULN-182134
cve CVE-2026-31511
commit-author Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
commit 5f5fa4c

This fixes the condition checking so mgmt_pending_valid is executed
whenever status != -ECANCELED otherwise calling mgmt_pending_free(cmd)
would kfree(cmd) without unlinking it from the list first, leaving a
dangling pointer. Any subsequent list traversal (e.g.,
mgmt_pending_foreach during __mgmt_power_off, or another
mgmt_pending_valid call) would dereference freed memory.

Link: https://lore.kernel.org/linux-bluetooth/20260315132013.75ab40c5@kernel.org/T/#m1418f9c82eeff8510c1beaa21cf53af20db96c06
Fixes: 302a1f6 ("Bluetooth: MGMT: Fix possible UAFs")
	Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
	Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
(cherry picked from commit 5f5fa4c)
	Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>
@pvts-mat pvts-mat force-pushed the ciqlts9_6-CVE-batch-28 branch from 4c216f8 to 494bfc0 Compare April 24, 2026 15:36
Copy link
Copy Markdown
Collaborator

@shreeya-patel98 shreeya-patel98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants