From: Paolo Abeni Date: Thu, 5 Jun 2025 10:37:10 +0000 (+0200) Subject: Merge tag 'ovpn-net-20250603' of https://github.com/OpenVPN/ovpn-net-next X-Git-Tag: v6.16-rc1~36^2~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ec6a328b2e68adfaa322b633519b72ab6cd33e3a;p=thirdparty%2Fkernel%2Flinux.git Merge tag 'ovpn-net-20250603' of https://github.com/OpenVPN/ovpn-net-next Antonio Quartulli says: ==================== In this batch you can find the following bug fixes: Patch 1: when releasing a UDP socket we were wrongly invoking setup_udp_tunnel_sock() with an empty config. This was not properly shutting down the UDP encap state. With this patch we simply undo what was done during setup. Patch 2: ovpn was holding a reference to a 'struct socket' without increasing its reference counter. This was intended and worked as expected until we hit a race condition where user space tries to close the socket while kernel space is also releasing it. In this case the (struct socket *)->sk member would disappear under our feet leading to a null-ptr-deref. This patch fixes this issue by having struct ovpn_socket hold a reference directly to the sk member while also increasing its reference counter. Patch 3: in case of errors along the TCP RX path (softirq) we want to immediately delete the peer, but this operation may sleep. With this patch we move the peer deletion to a scheduled worker. Patch 4 and 5 are instead fixing minor issues in the ovpn kselftests. * tag 'ovpn-net-20250603' of https://github.com/OpenVPN/ovpn-net-next: selftest/net/ovpn: fix missing file selftest/net/ovpn: fix TCP socket creation ovpn: avoid sleep in atomic context in TCP RX error path ovpn: ensure sk is still valid during cleanup ovpn: properly deconfigure UDP-tunnel ==================== Link: https://patch.msgid.link/20250603111110.4575-1-antonio@openvpn.net/ Signed-off-by: Paolo Abeni --- ec6a328b2e68adfaa322b633519b72ab6cd33e3a