net: Fix an unsafe loop on the list (CVE-2024-50024) | HOL Guard CVE