Files
scylladb/service
Emil Maskovsky 939ea402a4 storage_service: fix use-after-free in read_barrier during shutdown
load_stats_for_tablet_based_tables() called read_barrier() on the
group0 raft server without holding the group0 gate. This allowed
abort_and_drain() to proceed and destroy the server while
read_barrier() was still in flight — a use-after-free detected by
UBSan at raft/server.cc:1573.

Fix by holding hold_group0_gate() in load_stats_for_tablet_based_tables()
before calling read_barrier(). This prevents abort_and_drain() from
completing until the read_barrier operation finishes, matching the
contract that all group0 clients must hold the gate across async
server operations.

Fixes: SCYLLADB-2071

Backport: The bug is present in 2026.1 and 2026.2 therefore we should also backport there.

Closes scylladb/scylladb#30037
2026-06-03 18:15:24 +02:00
..
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00
2026-04-12 19:46:33 +03:00