From e354264e0c046454dc01f71eeb3fe8098e248ec6 Mon Sep 17 00:00:00 2001 From: SChernykh <15806605+SChernykh@users.noreply.github.com> Date: Sun, 24 May 2026 13:58:25 +0200 Subject: [PATCH] Fixed dangling iterator in is_remote_host_allowed - m_blocked_subnets.erase(it) either moves it to the next entry, or sets it to m_blocked_subnets.end() in which case the MCLOG_CYAN will access invalid data --- src/p2p/net_node.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl index 11474aaaa..d1f7e7cdd 100644 --- a/src/p2p/net_node.inl +++ b/src/p2p/net_node.inl @@ -206,8 +206,8 @@ namespace nodetool { if (now >= it->second) { - it = m_blocked_subnets.erase(it); MCLOG_CYAN(el::Level::Info, "global", "Subnet " << it->first.host_str() << " unblocked."); + it = m_blocked_subnets.erase(it); continue; } if (it->first.matches(ipv4_address))