apport information
** Summary changed:
- launchpad-submit
+ Kernel 6.8.0-149: double free of struct dst_entry in L2TP TX path (rcuref -
imbalanced put()) causes silent memory corruption and hard hang
** Tags added: apport-collected jammy
** Description changed:
This is a REGRESSION. The reporter has used this exact L2TP/IPsec setup
on this exact machine for more than 1.5 years with no such failures.
Hangs started recently. Last known-good kernel: 6.8.0-138-generic (still
installed). Affected kernel: 6.8.0-149-generic.
== Summary ==
On tearing down an L2TP/IPsec tunnel (NetworkManager + network-
manager-l2tp + xl2tpd + pppd + strongSwan), the kernel emits:
------------[ cut here ]------------
rcuref - imbalanced put()
WARNING: CPU: 4 PID: 28844 at lib/rcuref.c:266
rcuref_put_slowpath+0x7d/0x90
CPU: 4 PID: 28844 Comm: pppd Tainted: P OE 6.8.0-149-generic
#149~22.04.1-Ubuntu
Hardware name: Micro-Star International Co., Ltd. MS-7B86/B450-A PRO MAX
(MS-7B86), BIOS M.B0 12/03/2020
RIP: 0010:rcuref_put_slowpath+0x7d/0x90
Call Trace:
<TASK>
dst_release+0x5d/0xf0
__sk_dst_check+0x7a/0xa0
__ip_queue_xmit+0x2a0/0x510
ip_queue_xmit+0x15/0x30
l2tp_xmit_core.constprop.0+0x227/0x460 [l2tp_core]
l2tp_xmit_skb+0x30/0xa0 [l2tp_core]
pppol2tp_xmit+0x114/0x220 [l2tp_ppp]
__ppp_channel_push+0x53/0xd0
ppp_channel_push+0x44/0x90
ppp_write+0xf5/0x160
vfs_write+0x100/0x470
"rcuref - imbalanced put()" means an EXTRA put() is performed on the
cached route (struct dst_entry) in the L2TP transmit path: the reference
is dropped more times than it was taken. This is a double free of dst,
which silently corrupts kernel memory.
== Impact ==
Minutes to hours after the warning, the machine hangs completely:
- softlockup_panic=1 -- never fires
- hardlockup_panic=1 (NMI) -- never fires
- panic_on_rcu_stall=1 -- never fires
- panic_on_oops=1 -- never fires
- No panic, no kdump (the hang is memory corruption, not an oops)
Only a hardware watchdog (sp5100_tco) recovers the box. panic_on_warn=1
catches it only when the WARNING happens to fire before the hang;
usually the hang comes first.
== Environment ==
- Ubuntu 22.04.5 LTS (jammy)
- Kernel 6.8.0-149-generic (#149~22.04.1-Ubuntu);
linux-image-generic-hwe-22.04 = 6.8.0-149.149~22.04.1
- network-manager-l2tp 1.20.0-1build2, network-manager-l2tp-gnome
1.20.0-1build2
- xl2tpd 1.3.16-1ubuntu0.1
- strongswan / strongswan-charon / strongswan-libcharon 5.9.5-2ubuntu2.8
- ppp 2.4.9-1+1ubuntu3
- Tunnel type: L2TP/IPsec, IKEv1 (main mode), PSK + XAUTH, MTU/MRU 1400
- Modules: l2tp_core, l2tp_ppp, l2tp_netlink, pppox
== Steps to reproduce ==
1. Connect an L2TP/IPsec tunnel via NetworkManager.
2. Disconnect it.
3. On teardown the WARNING above fires intermittently; the system may hang
minutes-to-hours later.
The trigger is teardown (closing the tunnel), not connection.
== Additional warnings seen in the same sessions ==
refcount_t: addition on 0; use-after-free.
WARNING: CPU: 11 PID: 128 at lib/refcount.c:25
refcount_warn_saturate+0x12e/0x150
l2tp_tunnel_get_session+0xc8/0xd0 [l2tp_core]
refcount_t: underflow; use-after-free.
WARNING: CPU: 11 PID: 128 at lib/refcount.c:28
refcount_warn_saturate+0xa3/0x150
l2tp_tunnel_get_session+0xbc/0xd0 [l2tp_core]
Both point at reference-count corruption in l2tp_core, consistent with
the dst double-free above.
== Bisection hint ==
Regression introduced between 6.8.0-138-generic (clean) and
6.8.0-149-generic (buggy).
== Requested fix ==
- Correct the reference counting in l2tp_xmit_core() / the
- sk->sk_dst_cache handling so the cached dst is released exactly once,
- and audit l2tp_tunnel_get_session() refcounting.
+ Correct the reference counting in l2tp_xmit_core() / the sk->sk_dst_cache
handling so the cached dst is released exactly once, and audit
l2tp_tunnel_get_session() refcounting.
+ ---
+ ProblemType: Bug
+ ApportVersion: 2.20.11-0ubuntu82.10
+ Architecture: amd64
+ CRDA: N/A
+ CasperMD5CheckResult: unknown
+ CurrentDesktop: ubuntu:GNOME
+ DistroRelease: Ubuntu 22.04
+ MachineType: Micro-Star International Co., Ltd MS-7B86
+ NonfreeKernelModules: nvidia_modeset nvidia
+ Package: linux (not installed)
+ ProcFB: 0 nvidia-drmdrmfb
+ ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-6.8.0-138-generic
root=UUID=8500c4b5-7841-42be-82d2-2f5d3171a22b ro quiet splash
crashkernel=512M-:512M
+ ProcVersionSignature: Ubuntu 6.8.0-138.138~22.04.1-generic 6.8.12
+ RelatedPackageVersions:
+ linux-restricted-modules-6.8.0-138-generic N/A
+ linux-backports-modules-6.8.0-138-generic N/A
+ linux-firmware 20220329.git681281e4-0ubuntu3.42
+ RfKill:
+
+ Tags: jammy
+ Uname: Linux 6.8.0-138-generic x86_64
+ UpgradeStatus: Upgraded to jammy on 2026-11-20 (9 days ago)
+ UserGroups: adm audio cdrom dip docker kvm libvirt lpadmin lxd ollama plugdev
sambashare sudo
+ _MarkForUpload: True
+ dmi.bios.date: 12/03/2020
+ dmi.bios.release: 5.17
+ dmi.bios.vendor: American Megatrends Inc.
+ dmi.bios.version: M.B0
+ dmi.board.asset.tag: To be filled by O.E.M.
+ dmi.board.name: B450-A PRO MAX (MS-7B86)
+ dmi.board.vendor: Micro-Star International Co., Ltd
+ dmi.board.version: 4.0
+ dmi.chassis.asset.tag: To be filled by O.E.M.
+ dmi.chassis.type: 3
+ dmi.chassis.vendor: Micro-Star International Co., Ltd
+ dmi.chassis.version: 4.0
+ dmi.modalias:
dmi:bvnAmericanMegatrendsInc.:bvrM.B0:bd12/03/2020:br5.17:svnMicro-StarInternationalCo.,Ltd:pnMS-7B86:pvr4.0:rvnMicro-StarInternationalCo.,Ltd:rnB450-APROMAX(MS-7B86):rvr4.0:cvnMicro-StarInternationalCo.,Ltd:ct3:cvr4.0:skuTobefilledbyO.E.M.:
+ dmi.product.family: To be filled by O.E.M.
+ dmi.product.name: MS-7B86
+ dmi.product.sku: To be filled by O.E.M.
+ dmi.product.version: 4.0
+ dmi.sys.vendor: Micro-Star International Co., Ltd
** Attachment added: "AlsaInfo.txt"
https://bugs.launchpad.net/bugs/2178411/+attachment/6022194/+files/AlsaInfo.txt
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2178411
Title:
Kernel 6.8.0-149: double free of struct dst_entry in L2TP TX path
(rcuref - imbalanced put()) causes silent memory corruption and hard
hang
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2178411/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs