From: "metatron320@yahoo.com" <metatron320@yahoo.com>
To: "stable@vger.kernel.org" <stable@vger.kernel.org>
Cc: "regressions@lists.linux.dev" <regressions@lists.linux.dev>,
"linux-bluetooth@vger.kernel.org"
<linux-bluetooth@vger.kernel.org>
Subject: [REGRESSION] 6.1.191+: list_del corruption in hci_chan_del from l2cap_chan_destroy
Date: Sat, 28 Nov 2026 22:36:45 +0000 (UTC) [thread overview]
Message-ID: <505718284.984961.1795905405648@mail.yahoo.com> (raw)
In-Reply-To: 505718284.984961.1795905405648.ref@mail.yahoo.com
[-- Attachment #1: Type: text/plain, Size: 2800 bytes --]
Hello Linux Kernel Team,
Since 6.1.191, closing an L2CAP socket after the HCI link is gone crashes with "list_del corruption, ...->prev is LIST_POISON2" in hci_chan_del(), called from l2cap_sock_release() -> l2cap_chan_destroy(). 6.1.190 is good; 6.1.191, 6.1.192 and 6.1.193 are affected.
6.1.191 includes 967473b1e8bb, the backport of b4f82f9ed43a ("Bluetooth: L2CAP: Fix slab-use-after-free Read in l2cap_send_cmd"). It moves hci_chan_del(conn->hchan) from l2cap_conn_del() to l2cap_conn_free() and drops "conn->hchan = NULL". hci_conn cleanup still frees the channel via hci_chan_list_flush(), so the final l2cap_conn_put() deletes it a second time. Upstream fixed this with ab4eedb790ca ("Bluetooth: L2CAP: Fix corrupted list in hci_chan_del"), which is not in 6.1.y.
Please either backport ab4eedb790ca (and its follow-ups) to 6.1.y or revert 967473b1e8bb. The same crash has also been reported on Debian's 6.1.192 kernel.
A trimmed except of the crash trace from my system is attached here (ELRepo kernel-lt build of upstream 6.1.193). An investigation into where the potential bug was committed is included below. Note: a faulty DIMM was present at the time of this crash and has since been replaced. The double deletion follows from the code paths above independently of memory errors, and the same crash has been reported on other systems running 6.1.192.
== Suspect commit in 6.1.191 (ChangeLog-6.1.191) ==
commit 967473b1e8bb6d941e034ec1f76de40ccf54a8cf
Bluetooth: L2CAP: Fix slab-use-after-free Read in l2cap_send_cmd
[ Upstream commit b4f82f9ed43aefa79bec2504ae8c29be0c0f5d1d ]
== Its effect (patch-6.1.190-191, net/bluetooth/l2cap_core.c) ==
@@ -1843,10 +1857,7 @@ static void l2cap_conn_del(struct hci_conn *hcon, int err)
mutex_unlock(&conn->chan_lock);
- hci_chan_del(conn->hchan);
-
hcon->l2cap_data = NULL;
- conn->hchan = NULL;
l2cap_conn_put(conn);
}
@@ -1854,6 +1865,7 @@ static void l2cap_conn_free(struct kref *ref)
{
struct l2cap_conn *conn = container_of(ref, struct l2cap_conn, ref);
+ hci_chan_del(conn->hchan);
hci_conn_put(conn->hcon);
kfree(conn);
}
== v6.1.193: channel still flushed by hci_conn cleanup ==
net/bluetooth/hci_conn.c:
149: hci_chan_list_flush(conn);
2798:void hci_chan_list_flush(struct hci_conn *conn)
2805: hci_chan_del(chan);
net/bluetooth/l2cap_core.c:
1844:static void l2cap_conn_del(struct hci_conn *hcon, int err)
1890:static void l2cap_conn_free(struct kref *ref)
1894: hci_chan_del(conn->hchan);
== Mainline: deletion back in l2cap_conn_del() ==
net/bluetooth/l2cap_core.c:
1965: hci_chan_del(conn->hchan);
1966: conn->hchan = NULL;
1976:static void l2cap_conn_free(struct kref *ref)
== Upstream follow-up ab4eedb790ca absent from 6.1.y ==
ChangeLog matches for "Fix corrupted list in hci_chan_del":
6.1.191: 0
6.1.192: 0
6.1.193: 0
[-- Attachment #2: bt-crash-excerpt-6.1.193.txt --]
[-- Type: text/plain, Size: 5953 bytes --]
[ 0.000000] Linux version 6.1.193-1.el9.elrepo.x86_64 (mockbuild@105c9b9d3b8b4670afa9d16185a6f138) (gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-17), GNU ld version 2.35.2-72.el9) #1 SMP PREEMPT_DYNAMIC Mon Nov 23 12:59:41 EST 2026
[ 0.000000] DMI: ASUS System Product Name/PRIME Z590M-PLUS, BIOS 1801 12/26/2022
[...]
[ 4.481421] Bluetooth: Core ver 2.22
[ 4.481444] Bluetooth: HCI device and connection manager initialized
[ 4.481447] Bluetooth: HCI socket layer initialized
[ 4.481449] Bluetooth: L2CAP socket layer initialized
[ 4.481452] Bluetooth: SCO socket layer initialized
[ 4.488915] usbcore: registered new interface driver btusb
[ 4.796758] Bluetooth: hci0: CSR: Setting up dongle with HCI ver=6 rev=22bb; LMP ver=6 subver=22bb; manufacturer=10
[ 7.971785] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 7.971789] Bluetooth: BNEP filters: protocol multicast
[ 7.971793] Bluetooth: BNEP socket layer initialized
[ 7.973872] Bluetooth: MGMT ver 1.22
[ 12.120873] Bluetooth: RFCOMM TTY layer initialized
[ 12.120881] Bluetooth: RFCOMM socket layer initialized
[ 12.120935] Bluetooth: RFCOMM ver 1.11
[...]
[12661.169702] list_del corruption, ffff8a34c3ce1740->prev is LIST_POISON2 (dead000000000122)
[12661.169715] ------------[ cut here ]------------
[12661.169716] kernel BUG at lib/list_debug.c:56!
[12661.169721] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI
[12661.169724] CPU: 7 PID: 1756 Comm: bluetoothd Kdump: loaded Tainted: G E 6.1.193-1.el9.elrepo.x86_64 #1
[12661.169727] Hardware name: ASUS System Product Name/PRIME Z590M-PLUS, BIOS 1801 12/26/2022
[12661.169729] RIP: 0010:__list_del_entry_valid.cold+0x4b/0x6f
[12661.169734] Code: fe ff 0f 0b 48 89 f2 48 89 fe 48 c7 c7 28 fa bf a2 e8 ba 9a fe ff 0f 0b 48 89 fe 48 89 ca 48 c7 c7 f0 f9 bf a2 e8 a6 9a fe ff <0f> 0b 48 89 fe 48 c7 c7 b8 f9 bf a2 e8 95 9a fe ff 0f 0b 48 89 fe
[12661.169736] RSP: 0018:ffffcd7dc149be00 EFLAGS: 00010246
[12661.169739] RAX: 000000000000004e RBX: ffff8a355c234000 RCX: 0000000000000000
[12661.169741] RDX: 0000000000000000 RSI: ffffffffa2be82b3 RDI: 00000000ffffffff
[12661.169743] RBP: ffff8a34c3ce1740 R08: 0000000000000000 R09: 00000000ffff7fff
[12661.169745] R10: ffffcd7dc149bcb0 R11: ffffffffa37e87c8 R12: ffff8a34ec032800
[12661.169746] R13: 0000000000000000 R14: ffff8a34ec032af0 R15: ffff8a34ec031a18
[12661.169748] FS: 00007f773e219800(0000) GS:ffff8a3bfc5c0000(0000) knlGS:0000000000000000
[12661.169750] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[12661.169752] CR2: 00000ab5f65d20a8 CR3: 00000001d5df4002 CR4: 00000000003706e0
[12661.169754] Call Trace:
[12661.169756] <TASK>
[12661.169759] hci_chan_del+0x18/0x90 [bluetooth]
[12661.169795] l2cap_chan_destroy+0xc4/0x100 [bluetooth]
[12661.169830] l2cap_sock_release+0xcc/0x100 [bluetooth]
[12661.169867] __sock_release+0x3d/0xb0
[12661.169872] sock_close+0x11/0x20
[12661.169875] __fput+0x96/0x250
[12661.169880] task_work_run+0x6e/0xc0
[12661.169885] exit_to_user_mode_loop+0x13c/0x170
[12661.169890] exit_to_user_mode_prepare+0x56/0x60
[12661.169893] syscall_exit_to_user_mode+0x17/0x40
[12661.169897] do_syscall_64+0x42/0x90
[12661.169900] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[12661.169903] RIP: 0033:0x7f773e0ffc77
[12661.169906] Code: ff e8 0d ee 01 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 41 c3 48 83 ec 18 89 7c 24 0c e8 23 81 f8 ff
[12661.169908] RSP: 002b:00007ffedd8cbda8 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
[12661.169911] RAX: 0000000000000000 RBX: 00005635f80ead00 RCX: 00007f773e0ffc77
[12661.169912] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000000000001c
[12661.169914] RBP: 0000000000000000 R08: 0000000000179333 R09: 0000000000000021
[12661.169915] R10: 0000000000000020 R11: 0000000000000246 R12: 0000000000000001
[12661.169917] R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000000
[12661.169920] </TASK>
[12661.169921] Modules linked in: nct6775(E) nct6775_core(E) hwmon_vid(E) rfcomm(E) snd_seq_dummy(E) snd_hrtimer(E) hid_logitech_hidpp(E) hid_logitech_dj(E) joydev(E) binfmt_misc(E) bnep(E) rc_hauppauge(E) em28xx_rc(E) rc_core(E) si2157(E) lgdt3306a(E) i2c_mux(E) em28xx_dvb(E) dvb_core(E) sunrpc(E) nft_chain_nat(E) nf_nat(E) ipt_REJECT(E) nf_reject_ipv4(E) xt_set(E) xt_conntrack(E) nf_conntrack(E) nf_defrag_ipv6(E) nf_defrag_ipv4(E) nft_compat(E) nf_tables(E) qrtr(E) overlay(E) ip_set_hash_net(E) ip_set(E) nfnetlink(E) vfat(E) fat(E) ext4(E) mbcache(E) jbd2(E) btusb(E) btrtl(E) btbcm(E) btintel(E) btmtk(E) bluetooth(E) em28xx(E) tveeprom(E) videodev(E) mc(E) snd_hda_codec_hdmi(E) intel_rapl_msr(E) mei_pxp(E) mei_hdcp(E) ee1004(E) iTCO_wdt(E) intel_pmc_bxt(E) iTCO_vendor_support(E) snd_hda_codec_realtek(E) snd_hda_codec_generic(E) snd_hda_intel(E) snd_intel_dspcfg(E) snd_intel_sdw_acpi(E) snd_hda_codec(E) intel_rapl_common(E) snd_hda_core(E) intel_tcc_cooling(E) snd_hwdep(E)
[12661.169966] x86_pkg_temp_thermal(E) intel_powerclamp(E) snd_seq(E) coretemp(E) snd_seq_device(E) eeepc_wmi(E) rapl(E) snd_pcm(E) intel_cstate(E) asus_wmi(E) ledtrig_audio(E) sparse_keymap(E) platform_profile(E) intel_uncore(E) snd_timer(E) rfkill(E) cdc_acm(E) wmi_bmof(E) pcspkr(E) snd(E) i2c_i801(E) mei_me(E) i2c_designware_platform(E) soundcore(E) onboard_usb_hub(E) i2c_smbus(E) mei(E) i2c_designware_core(E) idma64(E) intel_pmc_core(E) acpi_pad(E) acpi_tad(E) raid10(E) xfs(E) libcrc32c(E) sd_mod(E) sg(E) i915(E) i2c_algo_bit(E) drm_buddy(E) intel_gtt(E) drm_display_helper(E) drm_kms_helper(E) cec(E) ttm(E) crct10dif_pclmul(E) crc32_pclmul(E) crc32c_intel(E) polyval_clmulni(E) ahci(E) nvme(E) mpt3sas(E) libahci(E) polyval_generic(E) drm(E) nvme_core(E) libata(E) raid_class(E) ghash_clmulni_intel(E) r8169(E) t10_pi(E) scsi_transport_sas(E) video(E) wmi(E) pinctrl_tigerlake(E) dm_mirror(E) dm_region_hash(E) dm_log(E) dm_mod(E) i2c_dev(E) fuse(E)
next parent reply other threads:[~2026-11-28 22:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <505718284.984961.1795905405648.ref@mail.yahoo.com>
2026-11-28 22:36 ` metatron320 [this message]
2026-11-29 18:59 ` [REGRESSION] 6.1.191+: list_del corruption in hci_chan_del from l2cap_chan_destroy Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=505718284.984961.1795905405648@mail.yahoo.com \
--to=metatron320@yahoo.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=regressions@lists.linux.dev \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox