diff options
author | Florian Westphal | 2022-08-09 18:34:02 +0200 |
---|---|---|
committer | Pablo Neira Ayuso | 2022-08-09 20:13:30 +0200 |
commit | 580077855a40741cf511766129702d97ff02f4d9 (patch) | |
tree | b8c02009edeb09bf67fa12ab291b3e6dea4b55f2 /net/ipv6 | |
parent | f323ef3a0d49e147365284bc1f02212e617b7f09 (diff) |
netfilter: nf_tables: fix null deref due to zeroed list head
In nf_tables_updtable, if nf_tables_table_enable returns an error,
nft_trans_destroy is called to free the transaction object.
nft_trans_destroy() calls list_del(), but the transaction was never
placed on a list -- the list head is all zeroes, this results in
a null dereference:
BUG: KASAN: null-ptr-deref in nft_trans_destroy+0x26/0x59
Call Trace:
nft_trans_destroy+0x26/0x59
nf_tables_newtable+0x4bc/0x9bc
[..]
Its sane to assume that nft_trans_destroy() can be called
on the transaction object returned by nft_trans_alloc(), so
make sure the list head is initialised.
Fixes: 55dd6f93076b ("netfilter: nf_tables: use new transaction infrastructure to handle table")
Reported-by: mingi cho <mgcho.minic@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/ipv6')
0 files changed, 0 insertions, 0 deletions