diff options
| author | 2026-10-11 17:23:22 +0700 | |
|---|---|---|
| committer | 2026-11-10 18:58:45 +0100 | |
| commit | 395aff9cf2f9332da107195249b6aff1111b1c94 (patch) | |
| tree | 0936f86ff9d36dac9be9fccb37a5e024534a554f /tools/perf/python/stackcollapse.py | |
| parent | net: mana: fix XDP_REDIRECT of pre-allocated RX buffers (diff) | |
wireguard: timers: mark racy persistent_keepalive_interval accesses
wg_set_device_doit() updates peer->persistent_keepalive_interval under
device_update_lock, while the RX/TX paths read it locklessly in
wg_timers_any_authenticated_packet_traversal() and in the persistent
keepalive timer. KCSAN reports the race:
BUG: KCSAN: data-race in set_peer / wg_timers_any_authenticated_packet_traversal
write to ... by task 3648 on cpu 1:
set_peer+0x... drivers/net/wireguard/netlink.c:457
wg_set_device_doit+0x...
read to ... by task 3652 on cpu 0:
wg_timers_any_authenticated_packet_traversal+0x... timers.c:217
wg_packet_consume_data_done+0x...
wg_packet_rx_poll+0x...
The race is benign, but the reader also loads the field twice, so the
zero check and the timer expiry computation can see different values.
Load it once with READ_ONCE() and mark the writer and the other lockless
reader accordingly.
Reported-by: syzbot+de9701a2cad597c14d34@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=de9701a2cad597c14d34
Fixes: e7096c131e51 ("net: WireGuard secure network tunnel")
Signed-off-by: Nguyen Ngoc Thang <ngocthang2710.1999@gmail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'tools/perf/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
