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: <309c3e431edf9ac461bb9513a3ed795069590ed2.1732269855.git.xiaopei01@kylinos.cn>
Date: Fri, 22 Nov 2024 18:06:36 +0800
From: Pei Xiao <xiaopei01@...inos.cn>
To: syzbot+84d0441b9860f0d63285@...kaller.appspotmail.com
Cc: xiaopeitux@...mail.com,
	linux-kernel@...r.kernel.org,
	Pei Xiao <xiaopei01@...inos.cn>
Subject: [PATCH] BUG: using smp_processor_id() in preemptible [00000000] code: syz.3.1627/12102 caller is nft_inner_eval+0xda/0x18e0 net/netfilter/nft_inner.c:251

---
 net/netfilter/nft_inner.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/net/netfilter/nft_inner.c b/net/netfilter/nft_inner.c
index 928312d01eb1..86c94d8b90c8 100644
--- a/net/netfilter/nft_inner.c
+++ b/net/netfilter/nft_inner.c
@@ -248,9 +248,13 @@ static bool nft_inner_parse_needed(const struct nft_inner *priv,
 static void nft_inner_eval(const struct nft_expr *expr, struct nft_regs *regs,
 			   const struct nft_pktinfo *pkt)
 {
-	struct nft_inner_tun_ctx *tun_ctx = this_cpu_ptr(&nft_pcpu_tun_ctx);
+	struct nft_inner_tun_ctx *tun_ctx;
 	const struct nft_inner *priv = nft_expr_priv(expr);
 
+	local_bh_disable();
+	tun_ctx = this_cpu_ptr(&nft_pcpu_tun_ctx);
+	local_bh_enable();
+
 	if (nft_payload_inner_offset(pkt) < 0)
 		goto err;
 
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ