diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2022-03-17 14:04:42 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-03-28 09:46:47 +0300 |
commit | 06f0ff82c70241a766a811ae1acf07d6e2734dcb (patch) | |
tree | fe6c17edbc694ae5a459af110eb0019fb4a1fc80 /net | |
parent | 5061bf0f79d59062a4d349cb1ef9565bbe749b39 (diff) | |
download | linux-06f0ff82c70241a766a811ae1acf07d6e2734dcb.tar.xz |
netfilter: nf_tables: initialize registers in nft_do_chain()
commit 4c905f6740a365464e91467aa50916555b28213d upstream.
Initialize registers to avoid stack leak into userspace.
Fixes: 96518518cc41 ("netfilter: add nftables")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/nf_tables_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nf_tables_core.c b/net/netfilter/nf_tables_core.c index 96c74c4c7176..ceb0ef437e23 100644 --- a/net/netfilter/nf_tables_core.c +++ b/net/netfilter/nf_tables_core.c @@ -153,7 +153,7 @@ nft_do_chain(struct nft_pktinfo *pkt, void *priv) struct nft_rule *const *rules; const struct nft_rule *rule; const struct nft_expr *expr, *last; - struct nft_regs regs; + struct nft_regs regs = {}; unsigned int stackptr = 0; struct nft_jumpstack jumpstack[NFT_JUMP_STACK_SIZE]; bool genbit = READ_ONCE(net->nft.gencursor); |