@cryptotaxi247 / netdata-1 / commits / 272ea7cb9

rrdhost name fix heap-use-after-free (#19826)

rrdhost machine guid should not be linked, but copied to the dictionary, so that delayed destruction of the dictionary will not introduce heap-use-after-free

Costa Tsaousis committed Mar 11, 2025 at 15:52 UTC 272ea7cb9465aec2b3b0d1f863e5bc4c876e9ef5
1 file changed +1 -1
src/database/rrdhost.c
+1 -1
@@ -55,7 +55,7 @@ DICTIONARY *rrdhost_root_index = NULL;
55 void rrdhost_init() {
56 if(unlikely(!rrdhost_root_index)) {
57 rrdhost_root_index = dictionary_create_advanced(
58 - DICT_OPTION_NAME_LINK_DONT_CLONE | DICT_OPTION_VALUE_LINK_DONT_CLONE | DICT_OPTION_DONT_OVERWRITE_VALUE,
58 + DICT_OPTION_VALUE_LINK_DONT_CLONE | DICT_OPTION_DONT_OVERWRITE_VALUE,
59 &dictionary_stats_category_rrdhost, 0);
60 }
61 }