Additional information: this is a regression between 6.8.0-138 and 6.8.0-149.

- On 6.8.0-138 (12 Oct - 12 Nov 2026), the same L2TP/IPsec VPN was started 23 
times
  ("xl2tpd: Using l2tp kernel support"), with the same userspace (xl2tpd 
1.3.16-1ubuntu0.1,
  strongswan 5.9.5-2ubuntu2.8, network-manager-l2tp 1.20.20). syslog/kern.log 
show no
  refcount_t warning, no pppol2tp_xmit warning and no Oops over that period.
- On 6.8.0-149, both successful connections (14 Nov, 12:33:47 and 13:03:28) 
logged the three
  refcount_t warnings (addition on 0 / underflow / saturated) in the same 
second the tunnel
  came up. 568 "pppol2tp_xmit" warnings followed, then the crashes.

l2tp/ppp entries in the changelog between 6.8.0-138 and 6.8.0-149:
  - l2tp: improve tunnel/session refcount helpers
  - l2tp: use refcount_inc_not_zero in l2tp_session_get_by_ifname
  - l2tp: pppol2tp: hold reference to session in pppol2tp_ioctl()
  - l2tp: fix tunnel and session refcount leak on seq_file release
  - l2tp: Don't assign net->gen->ptr[] for pppol2tp_net_ops
  - ppp: defer channel free to an RCU grace period to fix pppol2tp RX UAF

Upstream fixes that I could not find in 6.8.0-149:
  - "l2tp: prevent possible tunnel refcount underflow" (CVE-2024-49940), listed 
in the
    6.8.0-151 -proposed changelog;
  - "l2tp: use list_del_rcu in l2tp_session_unhash" (mainline 979c017803c4), 
not in 6.8.0-151.

Third crash on 19 Nov 2026, this time WITHOUT Docker (no container or bridge 
activity at all):
  - 10:28:37  VPN connects ("xl2tpd: Using l2tp kernel support"); the same 
three refcount_t
              warnings are logged in the same second;
  - 11:31:24  first "general protection fault, probably for non-canonical 
address" (5 in 11 s),
              faults in kmalloc_node_trace, hitting unrelated processes 
(systemd-resolve, ssh...);
  - 11:31:26  first "WARNING ... net/l2tp/l2tp_ppp.c:166 pppol2tp_xmit" (465 in 
one minute);
  - 11:32:24  full freeze, hard power-off.
So the L2TP/IPsec VPN alone is enough: about one hour after connecting, 
6.8.0-149 crashes.
Rebooted on 6.8.0-138 since then. Attached: 
kernel-logs-l2tp-6.8.0-149-2026-11-19.txt.gz
(kernel log from the VPN connection to the freeze).

I am happy to test a -proposed or test kernel.

** CVE added: https://cve.org/CVERecord?id=CVE-2024-49940

** Attachment added: "Kernel log of the 3rd crash, 19 Nov 2026 (VPN only, no 
Docker)"
   
https://bugs.launchpad.net/ubuntu/+source/linux-hwe-6.8/+bug/2174480/+attachment/6019364/+files/kernel-logs-l2tp-6.8.0-149-2026-11-19.txt.gz

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2174480

Title:
  6.8.0-149: refcount use-after-free in l2tp_tunnel_get_session when an
  L2TP/IPsec VPN connects, then kernel oops / full freeze

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-hwe-6.8/+bug/2174480/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to