From 1ab0a8cb726cb730954294423acec887b92fa5b0 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 13 Jan 2026 09:19:17 +0800 Subject: [PATCH] common/options: fix heap-use-after-free by using never-destroyed static The config schema map was using string_view keys that pointed to the name field of Option objects stored in the global ceph_options vector. When the vector is destroyed during program exit, the Option objects are freed, but background threads (like BlueStore::MempoolThread) may still be accessing config options, causing use-after-free. ASan reported: READ of size 19 at 0x503000047c80 thread T411 #12 md_config_t::find_option(std::string_view) const config.cc:261 #17 BlueStore::MempoolThread::entry() BlueStore.cc:5591 0x503000047c80 is located 0 bytes inside of 20-byte region freed by thread T0 here: #7 Option::~Option() options.h:15 #13 std::vector