Skip to content

Commit 2c74374

Browse files
ummakynesgregkh
authored andcommitted
netfilter: nf_tables: initialize registers in nft_do_chain()
commit 4c905f6 upstream. Initialize registers to avoid stack leak into userspace. Fixes: 9651851 ("netfilter: add nftables") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent eb1ba8d commit 2c74374

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/netfilter/nf_tables_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ nft_do_chain(struct nft_pktinfo *pkt, void *priv)
162162
struct nft_rule *const *rules;
163163
const struct nft_rule *rule;
164164
const struct nft_expr *expr, *last;
165-
struct nft_regs regs;
165+
struct nft_regs regs = {};
166166
unsigned int stackptr = 0;
167167
struct nft_jumpstack jumpstack[NFT_JUMP_STACK_SIZE];
168168
bool genbit = READ_ONCE(net->nft.gencursor);

0 commit comments

Comments
 (0)