Skip to content

Commit 4c905f6

Browse files
committed
netfilter: nf_tables: initialize registers in nft_do_chain()
Initialize registers to avoid stack leak into userspace. Fixes: 9651851 ("netfilter: add nftables") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
1 parent 6e1acfa commit 4c905f6

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
@@ -201,7 +201,7 @@ nft_do_chain(struct nft_pktinfo *pkt, void *priv)
201201
const struct nft_rule_dp *rule, *last_rule;
202202
const struct net *net = nft_net(pkt);
203203
const struct nft_expr *expr, *last;
204-
struct nft_regs regs;
204+
struct nft_regs regs = {};
205205
unsigned int stackptr = 0;
206206
struct nft_jumpstack jumpstack[NFT_JUMP_STACK_SIZE];
207207
bool genbit = READ_ONCE(net->nft.gencursor);

0 commit comments

Comments
 (0)