]> git.ipfire.org Git - thirdparty/nftables.git/commit
cache: initialize filter when fetching implicit chains
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 17 Sep 2024 17:18:09 +0000 (19:18 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 17 Sep 2024 19:42:30 +0000 (21:42 +0200)
commite3d2a5e852ceea587bfff5878e6e5c569f15116a
treeb419ff6076d61e292c88c2cbeeb52b6a87a940ac
parent9a6a8626504f64d40126afd279d9526b6bbccc60
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'

because filter->reset.rule remains uninitialized.

Initialize filter and replace existing construct to initialize table and
chain which leaves remaining fields uninitialized.

Fixes: dbff26bfba83 ("cache: consolidate reset command")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/cache.c