Files
scylladb/replica
Pavel Emelyanov 8cb32a9958 replica: Fix use-after-free in get_sstables_from_object_store
The lambdas inside get_sstables_from_object_store captured get_abort_src
by reference, but get_abort_src is a by-value function parameter living
on the stack frame of get_sstables_from_object_store. Since the outer
lambda is moved into seastar::async via get_sstables_from and executed
after get_sstables_from_object_store returns, the reference becomes
dangling.

Fix by capturing get_abort_src by value (copying the std::function)
in both lambdas.

Found by AddressSanitizer: stack-use-after-return at
distributed_loader.cc:243.

Fixes SCYLLADB-2172

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>

Closes scylladb/scylladb#29954
2026-05-22 15:05:21 +03:00
..
2026-04-12 19:46:33 +03:00
2026-03-18 19:24:26 +01: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
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-05-17 17:22:27 +02:00
2026-04-12 19:46:33 +03:00