pull request: fixes for ovpn 2026-05-14
Subsystems (4)
Antonio Quartulli
maintainercover pull request: fixes for ovpn 2026-05-14
Hello netdev team,
This batch includes a few fixes for net. Specifically:
Patch 1 fixes the remaining of the selftests in order to avoid TCP failures on slow kernels, where pings cannot be always delivered on time.
Patch 2 fixes a RCU deref outside of the RCU read critical area.
Patch 3 fixes a potential UAF in case of a TCP peer that fails to be added to the hash table, while being fully initialized. In this scenario, potentially ongoing TCP socket syscalls would attempt accessing a free'd peer.
Patch 4 fixes a race condition betwen interface teardown and a new peer being added via netlink. The race condition would lead to the "ghost peer" endlessly holding the netdev while the core is waiting for it to be released.
Patch 5 fixes dev dstats updates by ensuring they are always performed with BH disabled, to avoid concurrent updates on the same CPU.
Please pull or let me know of any issue.
Thanks a lot,
Antonio
The following changes since commit 93d809adc13001e9d3a3ceb8d1e60fae2fb740d6:
Merge branch 'vsock-virtio-fix-vsockmon-tap-skb-construction' (2026-05-12 12:52:18 +0200)
are available in the Git repository at:
https://github.com/OpenVPN/ovpn-net-next.git tags/ovpn-net-20260514
for you to fetch changes up to 0c0dddc07d272a8d25922e48041e8e4d2434df7e:
ovpn: disable BHs when updating device stats (2026-05-15 00:43:55 +0200)
----------------------------------------------------------------
Included fixes:
* fix TCP selftest failures by reducing number of attempted pings
* fix RCU ptr deref outside of RCU read section
* fix UAF in case of TCP peer failed to be added to hashtable
* fix race condition between iface teardown and new peer being added
* ensure dstats are updated with BH disabled to avoid concurrency
----------------------------------------------------------------
Antonio Quartulli (1):
ovpn: fix race between deleting interface and adding new peer
David Carlier (2):
ovpn: tcp - use cached peer pointer in ovpn_tcp_close()
ovpn: respect peer refcount in CMD_NEW_PEER error path
Ralf Lici (2):
selftests: ovpn: reduce remaining ping flood counts
ovpn: disable BHs when updating device stats
drivers/net/ovpn/io.c | 12 +++++------ drivers/net/ovpn/main.c | 12 ++--------- drivers/net/ovpn/netlink.c | 8 +++++--- drivers/net/ovpn/peer.c | 23 ++++++++++++++++++---- drivers/net/ovpn/peer.h | 1 - drivers/net/ovpn/stats.h | 16 +++++++++++++++ drivers/net/ovpn/tcp.c | 19 +++++++++++------- drivers/net/ovpn/udp.c | 2 +- .../selftests/net/ovpn/test-close-socket.sh | 2 +- tools/testing/selftests/net/ovpn/test-mark.sh | 6 +++--- tools/testing/selftests/net/ovpn/test.sh | 4 ++-- 11 files changed, 67 insertions(+), 38 deletions(-)
Antonio Quartulli
maintainerPATCH 1/5 selftests: ovpn: reduce remaining ping flood counts
From: Ralf Lici <[email protected]>
Commit 201ba706318d ("selftests: ovpn: reduce ping count in test.sh") lowered the baseline traffic flood ping count to avoid flakes on slower CI instances, however some instances were left out.
Apply the same limit to the remaining ovpn selftest flood pings that still request 500 packets.
--- tools/testing/selftests/net/ovpn/test-close-socket.sh | 2 +- tools/testing/selftests/net/ovpn/test-mark.sh | 6 +++--- tools/testing/selftests/net/ovpn/test.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
tools/testing/selftests/net/ovpn/test-close-socket.sh +1 -1
@@ -53,7 +53,7 @@ ovpn_run_ping_traffic() { for p in $(seq 1 ${OVPN_NUM_PEERS}); do ovpn_cmd_ok "send ping traffic to peer ${p}" \ - ip netns exec ovpn_peer0 ping -qfc 500 -w 3 \ + ip netns exec ovpn_peer0 ping -qfc 100 -w 3 \ 5.5.5.$((p + 1)) done }
tools/testing/selftests/net/ovpn/test-mark.sh +3 -3
@@ -66,7 +66,7 @@ ovpn_mark_run_baseline_traffic() { for p in $(seq 1 3); do ovpn_cmd_ok "send baseline traffic to peer ${p}" \ - ip netns exec ovpn_peer0 ping -qfc 500 -w 3 \ + ip netns exec ovpn_peer0 ping -qfc 100 -w 3 \ 5.5.5.$((p + 1)) done }
@@ -101,7 +101,7 @@ ovpn_mark_verify_drop_traffic() { local total_count for p in $(seq 1 3); do - if ping_output=$(ip netns exec ovpn_peer0 ping -qfc 500 -w 1 \ + if ping_output=$(ip netns exec ovpn_peer0 ping -qfc 100 -w 1 \ 5.5.5.$((p + 1)) 2>&1); then printf '%s\n' "expected ping to peer ${p} to fail \ after nft drop rule"
@@ -144,7 +144,7 @@ ovpn_mark_verify_traffic_recovery() { sleep 1 for p in $(seq 1 3); do ovpn_cmd_ok "send recovery traffic to peer ${p}" \ - ip netns exec ovpn_peer0 ping -qfc 500 -w 3 \ + ip netns exec ovpn_peer0 ping -qfc 100 -w 3 \ 5.5.5.$((p + 1)) done }
tools/testing/selftests/net/ovpn/test.sh +2 -2
@@ -110,7 +110,7 @@ ovpn_run_basic_traffic() { ovpn_run_lan_traffic() { ovpn_cmd_ok "ping LAN behind peer1" \ - ip netns exec ovpn_peer0 ping -qfc 500 -w 3 "${OVPN_LAN_IP}" + ip netns exec ovpn_peer0 ping -qfc 100 -w 3 "${OVPN_LAN_IP}" } ovpn_run_float_mode() {
@@ -127,7 +127,7 @@ ovpn_run_float_mode() { for p in $(seq 1 ${OVPN_NUM_PEERS}); do peer_ns="ovpn_peer${p}" ovpn_cmd_ok "ping tunnel after float peer ${p}" \ - ip netns exec "${peer_ns}" ping -qfc 500 -w 3 5.5.5.1 + ip netns exec "${peer_ns}" ping -qfc 100 -w 3 5.5.5.1 done }
Signature · 1 line
2.53.0
Re: [PATCH net 1/5] selftests: ovpn: reduce remaining ping flood counts
This series was applied to netdev/net.git (main) by Antonio Quartulli <[email protected]>:
Hello:
This series was applied to netdev/net.git (main)
by Antonio Quartulli <[email protected]>:
Quoted 10 lines · On Fri, 15 May 2026 01:15:40 +0200 you wrote:
From: Ralf Lici <[email protected]>
Commit
201ba706318d("selftests: ovpn: reduce ping count intest.sh") lowered the baseline traffic flood ping count to avoid flakes on slower CI instances, however some instances were left out.Apply the same limit to the remaining ovpn selftest flood pings that still request 500 packets.
[...]
Here is the summary with links:
- [net,1/5] selftests: ovpn: reduce remaining ping flood counts
https://git.kernel.org/netdev/net/c/7f1144977846 - [net,2/5] ovpn: tcp - use cached peer pointer in ovpn_tcp_close() https://git.kernel.org/netdev/net/c/775d8d7ad02a - [net,3/5] ovpn: respect peer refcount in CMD_NEW_PEER error path https://git.kernel.org/netdev/net/c/1fef6614673f - [net,4/5] ovpn: fix race between deleting interface and adding new peer https://git.kernel.org/netdev/net/c/982422b11e6f - [net,5/5] ovpn: disable BHs when updating device stats https://git.kernel.org/netdev/net/c/0c0dddc07d27
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Antonio Quartulli
maintainerPATCH 2/5 ovpn: tcp - use cached peer pointer in ovpn_tcp_close()
In reply to Antonio QuartulliFrom: David Carlier <[email protected]>
ovpn_tcp_close() loads the ovpn_socket via rcu_dereference_sk_user_data() under rcu_read_lock(), takes a reference on sock->peer, caches the peer pointer in a local, and drops the read lock. It then passes sock->peer (rather than the cached local) to ovpn_peer_del(), re-dereferencing the ovpn_socket after the RCU read section has ended.
Unlike ovpn_tcp_sendmsg(), which uses the same "load under RCU, use after unlock" pattern but is protected by lock_sock() held across the function, ovpn_tcp_close() runs without the socket lock: inet_release() invokes sk_prot->close() without taking lock_sock first.
ovpn_socket_release() can therefore complete its kref_put -> detach -> synchronize_rcu -> kfree(sock) sequence concurrently, in the window after ovpn_tcp_close() drops rcu_read_lock() but before it dereferences sock->peer. The synchronize_rcu() in ovpn_socket_release() protects readers that use the dereferenced pointer inside the RCU read section, not those that escape the pointer to a local and use it afterwards.
A reproducer follows the pattern of commit 94560267d6c4 ("ovpn: tcp - don't deref NULL sk_socket member after tcp_close()"): trigger a peer removal (keepalive expiration or netlink OVPN_CMD_DEL_PEER) at the same moment userspace closes the TCP fd. That commit fixed the detach-side of the same race window; this one fixes the close-side at a different victim.
Tighten the entry block to read sock->peer exactly once into the cached peer local, and route all subsequent uses (the hold check, the ovpn_peer_del() call, and the prot->close() invocation) through that local. sock->peer is only ever written once in ovpn_socket_new() under lock_sock(), before rcu_assign_sk_user_data() publishes the ovpn_socket, and is never reassigned afterwards - but the previous multi-read pattern made that invariant implicit rather than explicit. The same multi-read shape exists in ovpn_tcp_recvmsg(), ovpn_tcp_sendmsg(), ovpn_tcp_data_ready() and ovpn_tcp_write_space(); those will be cleaned up via a dedicated helper in a follow-up net-next series.
--- drivers/net/ovpn/tcp.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/net/ovpn/tcp.c +7 -2
@@ -581,14 +581,19 @@ static void ovpn_tcp_close(struct sock *sk, long timeout)rcu_read_lock (); sock =rcu_dereference_sk_user_data (sk); -if (!sock || !sock->peer || !ovpn_peer_hold (sock->peer)) { +if (!sock) {rcu_read_unlock ();return ; } + peer = sock->peer; +if (!peer || !ovpn_peer_hold (peer)) { +rcu_read_unlock (); +return ; + }rcu_read_unlock (); -ovpn_peer_del (sock->peer,OVPN_DEL_PEER_REASON_TRANSPORT_DISCONNECT ); +ovpn_peer_del (peer,OVPN_DEL_PEER_REASON_TRANSPORT_DISCONNECT ); peer->tcp.sk_cb.prot->close (sk, timeout);ovpn_peer_put (peer); }
Signature · 1 line
2.53.0
Antonio Quartulli
maintainerPATCH 3/5 ovpn: respect peer refcount in CMD_NEW_PEER error path
In reply to Antonio QuartulliFrom: David Carlier <[email protected]>
ovpn_nl_peer_new_doit()'s error path calls ovpn_peer_release() directly rather than ovpn_peer_put(), bypassing the kref. The accompanying comment ("peer was not yet hashed, thus it is not used in any context") holds for UDP but not for TCP.
For UDP, the ovpn_socket union uses the .ovpn arm and never points back at a peer; UDP encap_recv looks up peers via the not-yet-populated hashtables, so the new peer is unreachable until ovpn_peer_add() publishes it.
For TCP, ovpn_socket_new() sets ovpn_sock->peer and ovpn_tcp_socket_attach() publishes ovpn_sock via rcu_assign_sk_user_data(). From that moment until ovpn_socket_release() detaches in the error path, the TCP fd is fully wired: userspace recvmsg / sendmsg / close / poll on the fd, as well as the strparser-driven ovpn_tcp_rcv() path, can reach the peer through sk_user_data -> ovpn_sock->peer and bump its refcount via ovpn_peer_hold().
ovpn_tcp_socket_wait_finish() (called inside ovpn_socket_release()) drains strparser and the tx work, but does not synchronize with userspace syscall callers that already hold a peer reference. If ovpn_nl_peer_modify() or ovpn_peer_add() returns an error while such a caller is in flight - notably an ovpn_tcp_recvmsg() blocked in __skb_recv_datagram() on peer->tcp.user_queue - the direct ovpn_peer_release() destroys the peer while the caller still holds the reference, and the eventual ovpn_peer_put() from that caller operates on freed memory.
Replace the direct destructor call with ovpn_peer_put() so the kref correctly defers destruction until the last reference is dropped. In the common case where no concurrent user is present, behaviour is
unchanged: the kref hits zero immediately and ovpn_peer_release_kref() runs the same destructor.
With this conversion ovpn_peer_release() has no callers outside peer.c
- ovpn_peer_release_kref() in the same translation unit is the only remaining user - so make it static and drop its declaration from peer.h.
--- drivers/net/ovpn/netlink.c | 8 +++++--- drivers/net/ovpn/peer.c | 2 +- drivers/net/ovpn/peer.h | 1 - 3 files changed, 6 insertions(+), 5 deletions(-)
drivers/net/ovpn/netlink.c +5 -3
@@ -462,10 +462,12 @@ int ovpn_nl_peer_new_doit(struct sk_buff *skb, struct genl_info *info) sock_release:ovpn_socket_release (peer); peer_release: -/* release right away because peer was not yet hashed, thus it is not -* used in any context +/* For UDP, the peer is unreachable until added to the hashtables, so +* dropping the initial reference is enough. For TCP, the peer may be +* concurrently reachable via sk_user_data->peer until +* ovpn_socket_release() detaches; rely on the refcount. */ -ovpn_peer_release (peer); +ovpn_peer_put (peer);return ret; }
drivers/net/ovpn/peer.c +1 -1
@@ -354,7 +354,7 @@ static void ovpn_peer_release_rcu(struct rcu_head *head)* ovpn_peer_release - release peer private members * @peer: the peer to release */ -void ovpn_peer_release (struct ovpn_peer *peer) +static void ovpn_peer_release (struct ovpn_peer *peer) {ovpn_crypto_state_release (&peer->crypto);spin_lock_bh (&peer->lock);
drivers/net/ovpn/peer.h +0 -1
@@ -127,7 +127,6 @@ static inline bool ovpn_peer_hold(struct ovpn_peer *peer)return kref_get_unless_zero (&peer->refcount); } -void ovpn_peer_release (struct ovpn_peer *peer);void ovpn_peer_release_kref (struct kref *kref);/**
Signature · 1 line
2.53.0
Antonio Quartulli
maintainerPATCH 4/5 ovpn: fix race between deleting interface and adding new peer
In reply to Antonio QuartulliWhile deleting an existing ovpn interface, there is a very narrow window where adding a new peer via netlink may cause the netdevice to hang and prevent its unregistration.
It may happen during ovpn_dellink(), when all existing peers are freed and the device is queued for deregistration, but a CMD_PEER_NEW message comes in adding a new peer that takes again a reference to the netdev.
At this point there is no way to release the device because we are under the assumption that all peers were already released.
Fix the race condition by releasing all peers in ndo_uninit(), when the netdevice has already been removed from the netdev list.
Also ovpn_peer_add() has now an extra check that forces the function to bail out if the device reg_state is not REGISTERED. This way any incoming CMD_PEER_NEW racing with the interface deletion routine will simply stop before adding the peer.
Note that the above check happens while holding the netdev_lock to prevent racing netdev state changes.
ovpn_dellink() is now empty and can be removed.
--- drivers/net/ovpn/main.c | 12 ++---------- drivers/net/ovpn/peer.c | 21 ++++++++++++++++++--- 2 files changed, 20 insertions(+), 13 deletions(-)
drivers/net/ovpn/main.c +2 -10
@@ -92,6 +92,8 @@ static void ovpn_net_uninit(struct net_device *dev) {struct ovpn_priv *ovpn =netdev_priv (dev); +disable_delayed_work_sync (&ovpn->keepalive_work); +ovpn_peers_free (ovpn,NULL ,OVPN_DEL_PEER_REASON_TEARDOWN );gro_cells_destroy (&ovpn->gro_cells); }
@@ -208,15 +210,6 @@ static int ovpn_newlink(struct net_device *dev,return register_netdevice (dev); } -static void ovpn_dellink (struct net_device *dev,struct list_head *head) -{ -struct ovpn_priv *ovpn =netdev_priv (dev); - -cancel_delayed_work_sync (&ovpn->keepalive_work); -ovpn_peers_free (ovpn,NULL ,OVPN_DEL_PEER_REASON_TEARDOWN ); -unregister_netdevice_queue (dev, head); -} -static int ovpn_fill_info (struct sk_buff *skb,const struct net_device *dev) {struct ovpn_priv *ovpn =netdev_priv (dev);
@@ -235,7 +228,6 @@ static struct rtnl_link_ops ovpn_link_ops = { .policy = ovpn_policy, .maxtype = IFLA_OVPN_MAX, .newlink = ovpn_newlink, - .dellink = ovpn_dellink, .fill_info = ovpn_fill_info, };
drivers/net/ovpn/peer.c +18 -3
@@ -1034,14 +1034,29 @@ static int ovpn_peer_add_p2p(struct ovpn_priv *ovpn, struct ovpn_peer *peer)*/ int ovpn_peer_add (struct ovpn_priv *ovpn,struct ovpn_peer *peer) { +int ret = -ENODEV ; + +/* Prevent adding new peers while destroying the ovpn interface. +* Failing to do so would end up holding the device reference +* endlessly hostage of the new peer object with no chance of +* release.. +*/ +netdev_lock (ovpn->dev); +if (ovpn->dev->reg_state !=NETREG_REGISTERED ) + goto out; +switch (ovpn->mode) {case OVPN_MODE_MP : -return ovpn_peer_add_mp (ovpn, peer); + ret =ovpn_peer_add_mp (ovpn, peer); +break ;case OVPN_MODE_P2P : -return ovpn_peer_add_p2p (ovpn, peer); + ret =ovpn_peer_add_p2p (ovpn, peer); +break ; } +out: +netdev_unlock (ovpn->dev); -return -EOPNOTSUPP ; +return ret; }/**
Signature · 1 line
2.53.0
Antonio Quartulli
maintainerPATCH 5/5 ovpn: disable BHs when updating device stats
In reply to Antonio QuartulliFrom: Ralf Lici <[email protected]>
ovpn updates dev->dstats from both process and softirq contexts. In particular, TCP paths may run from socket callbacks, workqueues or strparser work, while UDP receive and ovpn's ndo_start_xmit path may update the same per-device dstats from BH context.
Add ovpn device drop-stat helpers that disable BHs around dev_dstats_rx_dropped() and dev_dstats_tx_dropped(), and use them for drop accounting.
The successful RX dev_dstats_rx_add() update is already covered by the BH-disabled section around gro_cells_receive(). For the successful TCP TX dev_dstats_tx_add() update, replace the existing preempt-disabled section with a BH-disabled one.
--- drivers/net/ovpn/io.c | 12 ++++++------ drivers/net/ovpn/stats.h | 16 ++++++++++++++++ drivers/net/ovpn/tcp.c | 10 +++++----- drivers/net/ovpn/udp.c | 2 +- 4 files changed, 28 insertions(+), 12 deletions(-)
drivers/net/ovpn/io.c +6 -6
@@ -201,7 +201,7 @@ void ovpn_decrypt_post(void *data, int ret) skb =NULL ; drop:if (unlikely (skb)) -dev_dstats_rx_dropped (peer->ovpn->dev); +ovpn_dev_dstats_rx_dropped (peer->ovpn->dev);kfree_skb (skb); drop_nocount:if (likely (peer))
@@ -225,7 +225,7 @@ void ovpn_recv(struct ovpn_peer *peer, struct sk_buff *skb)net_info_ratelimited ("%s: no available key for peer %u, key-id: %u\n" ,netdev_name (peer->ovpn->dev), peer->id, key_id); -dev_dstats_rx_dropped (peer->ovpn->dev); +ovpn_dev_dstats_rx_dropped (peer->ovpn->dev);kfree_skb (skb);ovpn_peer_put (peer);return ;
@@ -301,7 +301,7 @@ void ovpn_encrypt_post(void *data, int ret)rcu_read_unlock (); err:if (unlikely (skb)) -dev_dstats_tx_dropped (peer->ovpn->dev); +ovpn_dev_dstats_tx_dropped (peer->ovpn->dev);if (likely (peer))ovpn_peer_put (peer);if (likely (ks))
@@ -343,7 +343,7 @@ static void ovpn_send(struct ovpn_priv *ovpn, struct sk_buff *skb,*/ skb_list_walk_safe(skb, curr, next) {if (unlikely (!ovpn_encrypt_one (peer, curr))) { -dev_dstats_tx_dropped (ovpn->dev); +ovpn_dev_dstats_tx_dropped (ovpn->dev);kfree_skb (curr); } }
@@ -414,7 +414,7 @@ netdev_tx_t ovpn_net_xmit(struct sk_buff *skb, struct net_device *dev)if (unlikely (!curr)) {net_err_ratelimited ("%s: skb_share_check failed for payload packet\n" ,netdev_name (dev)); -dev_dstats_tx_dropped (ovpn->dev); +ovpn_dev_dstats_tx_dropped (ovpn->dev);continue ; }
@@ -440,7 +440,7 @@ netdev_tx_t ovpn_net_xmit(struct sk_buff *skb, struct net_device *dev) drop:ovpn_peer_put (peer); drop_no_peer: -dev_dstats_tx_dropped (ovpn->dev); +ovpn_dev_dstats_tx_dropped (ovpn->dev);skb_tx_error (skb);kfree_skb_list (skb);return NETDEV_TX_OK ;
drivers/net/ovpn/stats.h +16 -0
@@ -11,6 +11,8 @@ #ifndef _NET_OVPN_OVPNSTATS_H_ #define _NET_OVPN_OVPNSTATS_H_ +#include <linux/netdevice.h> + /* one stat */ struct ovpn_peer_stat { atomic64_t bytes;
@@ -44,4 +46,18 @@ static inline void ovpn_peer_stats_increment_tx(struct ovpn_peer_stats *stats, ovpn_peer_stats_increment(&stats->tx, n); } +static inline void ovpn_dev_dstats_tx_dropped (struct net_device *dev) +{ +local_bh_disable (); +dev_dstats_tx_dropped (dev); +local_bh_enable (); +} + +static inline void ovpn_dev_dstats_rx_dropped (struct net_device *dev) +{ +local_bh_disable (); +dev_dstats_rx_dropped (dev); +local_bh_enable (); +} +#endif /* _NET_OVPN_OVPNSTATS_H_ */
drivers/net/ovpn/tcp.c +5 -5
@@ -152,7 +152,7 @@ static void ovpn_tcp_rcv(struct strparser *strp, struct sk_buff *skb)if (WARN_ON (!ovpn_peer_hold (peer))) goto err_nopeer;schedule_work (&peer->tcp.defer_del_work); -dev_dstats_rx_dropped (peer->ovpn->dev); +ovpn_dev_dstats_rx_dropped (peer->ovpn->dev); err_nopeer:kfree_skb (skb); }
@@ -298,9 +298,9 @@ static void ovpn_tcp_send_sock(struct ovpn_peer *peer, struct sock *sk) }while (peer->tcp.out_msg.len >0 );if (!peer->tcp.out_msg.len) { -preempt_disable (); +local_bh_disable ();dev_dstats_tx_add (peer->ovpn->dev, skb->len); -preempt_enable (); +local_bh_enable (); }kfree_skb (peer->tcp.out_msg.skb);
@@ -331,7 +331,7 @@ static void ovpn_tcp_send_sock_skb(struct ovpn_peer *peer, struct sock *sk,ovpn_tcp_send_sock (peer, sk);if (peer->tcp.out_msg.skb) { -dev_dstats_tx_dropped (peer->ovpn->dev); +ovpn_dev_dstats_tx_dropped (peer->ovpn->dev);kfree_skb (skb);return ; }
@@ -353,7 +353,7 @@ void ovpn_tcp_send_skb(struct ovpn_peer *peer, struct sock *sk,if (sock_owned_by_user (sk)) {if (skb_queue_len (&peer->tcp.out_queue) >=READ_ONCE (net_hotdata.max_backlog)) { -dev_dstats_tx_dropped (peer->ovpn->dev); +ovpn_dev_dstats_tx_dropped (peer->ovpn->dev);kfree_skb (skb); goto unlock; }
drivers/net/ovpn/udp.c +1 -1
@@ -125,7 +125,7 @@ static int ovpn_udp_encap_recv(struct sock *sk, struct sk_buff *skb)return 0 ; drop: -dev_dstats_rx_dropped (ovpn->dev); +ovpn_dev_dstats_rx_dropped (ovpn->dev); drop_noovpn:kfree_skb (skb);return 0 ;
Signature · 1 line
2.53.0
Paolo Abeni
maintainerQuoted 20 lines · Antonio Quartulli
Hello netdev team,
This batch includes a few fixes for net. Specifically:
Patch 1 fixes the remaining of the selftests in order to avoid TCP failures on slow kernels, where pings cannot be always delivered on time.
Patch 2 fixes a RCU deref outside of the RCU read critical area.
Patch 3 fixes a potential UAF in case of a TCP peer that fails to be added to the hash table, while being fully initialized. In this scenario, potentially ongoing TCP socket syscalls would attempt accessing a free'd peer.
Patch 4 fixes a race condition betwen interface teardown and a new peer being added via netlink. The race condition would lead to the "ghost peer" endlessly holding the netdev while the core is waiting for it to be released.
Quoted 5 lines
Patch 5 fixes dev dstats updates by ensuring they are always performed with BH disabled, to avoid concurrent updates on the same CPU.
Please pull or let me know of any issue.
LGTM, but sashiko idendified a number of pre-existing issue that could deserve some follow-up:
https://sashiko.dev/#/patchset/20260514231544.795993-1-antonio%40openvpn.net
/P
Antonio Quartulli
maintainerHi Paolo,
Quoted 4 lines · Paolo Abeni
LGTM, but sashiko idendified a number of pre-existing issue that could deserve some follow-up:
https://sashiko.dev/#/patchset/20260514231544.795993-1-antonio%40openvpn.net
Yes, we're working on them.
We've also configured sashiko to pick up patches directly from our mailing list, so we can work all the issues out before sending further PRs.
Thanks a lot.
Regards,
Quoted 3 lines
/P
Signature · 2 lines
Antonio Quartulli OpenVPN Inc.