diff options
| author | Ralf Lici <ralf@mandelbit.com> | 2026-08-28 16:50:25 +0200 |
|---|---|---|
| committer | Antonio Quartulli <antonio@openvpn.net> | 2026-09-21 11:39:13 +0200 |
| commit | fa603710bdb9aea33c0d9cc2c05ed24d84f58753 (patch) | |
| tree | b0f565dbc8c15a0877a228b8bb238b3987eae7bb /include/linux/timerqueue.h | |
| parent | 7c66b7a4ae80a9309e6dc1d24b7b6b897e6348eb (diff) | |
ovpn: validate peer state before caching UDP dst
UDP route lookup runs without peer->lock while the bind is protected by
RCU. The route key is snapshotted separately. Either can change while
the lookup is in progress.
The TX path currently checks only the route key before publishing the
looked-up dst. If the bind changes but the route key does not, a dst
resolved from the old endpoint can be installed in the cache after the
bind replacement.
Compare both the bind pointer and the route key under peer->lock before
updating the cache. The RCU read-side critical section keeps the old
bind alive throughout the lookup, so pointer identity is sufficient to
detect a replacement.
Fixes: f0281c1d3732 ("ovpn: add support for updating local or remote UDP endpoint")
Signed-off-by: Ralf Lici <ralf@mandelbit.com>
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions
