Skip to contentSkip to conversation

cache: initialize filter when fetching implicit chains

PATCH Superseded Pablo Neira Ayuso 1 participant 1 message Sep 17, 2024 netfilter

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 cache: initialize filter when fetching implicit chains

ASAN reports:

src/cache.c:734:25: runtime error: load of value 189, which is not a valid value for type '_Bool'

initialize filter, otherwise filter->reset.rule is uninitialized.

Fixes dbff26bfba83 ("cache: consolidate reset command")
---
 src/cache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/cache.c +1 -1
index c8ef16033551..7288666256bb 100644
@@ -1118,7 +1118,7 @@ err_ctx_list:
 static int implicit_chain_cache(struct netlink_ctx *ctx, struct table *table,
 				const char *chain_name)
 {
-	struct nft_cache_filter filter;
+	struct nft_cache_filter filter = {};
 	struct chain *chain;
 	int ret = 0;
 
Signature · 1 line
2.30.2