lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_922C096E68955CEA7AED66CC3079766DA40A@qq.com>
Date: Tue,  2 Jul 2024 22:55:09 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+4fd66a69358fc15ae2ad@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
	syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [netfilter?] KASAN: slab-use-after-free Read in nf_tables_trans_destroy_work

Unbalanced increase and decrease of use in the table

#syz test: net-next 1c5fc27bc48a

diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 70d0bad029fd..33139e1b6d46 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -1498,6 +1498,7 @@ static int nf_tables_newtable(struct sk_buff *skb, const struct nfnl_info *info,
 	if (err < 0)
 		goto err_trans;
 
+	nft_use_inc_restore(&table->use);
 	list_add_tail_rcu(&table->list, &nft_net->tables);
 	return 0;
 err_trans:
@@ -9529,6 +9530,9 @@ static void nft_commit_release(struct nft_trans *trans)
 
 	nft_ctx_update(&ctx, trans);
 
+	if (trans->table)
+		nft_use_dec(&trans->table->use);
+
 	switch (trans->msg_type) {
 	case NFT_MSG_DELTABLE:
 	case NFT_MSG_DESTROYTABLE:


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ