πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
3 messages
3 total messages Started by "Baek Kyu, Kim" Thu, 12 Nov 2026 14:14
[PATCH net] netfilter: nfnetlink_queue: use verdict sender portid for expectation events
#15218
Author: "Baek Kyu, Kim"
Date: Thu, 12 Nov 2026 14:14
54 lines
12822 bytes
nfqnl_recv_verdict() checks the verdict sender using
NETLINK_CB(skb).portid, but nfqnl_ct_parse() passes
NETLINK_CB(entry->skb).portid to
attach_expect(). The latter skb holds the queued network packet, not the
Netlink verdict. Its control buffer does not identify the sender of the
verdict.

Pass the verdict sender's portid to nfqnl_ct_parse() and use it for
expectation events. Do not change the queued packet's control buffer.

Fixes: b7bd1809e078 ("netfilter: nfnetlink_queue: get rid of nfnetlink_queue_ct.c")
Signed-off-by: Baek Kyu, Kim <pocj8ur4in@gmail.com>
---
Tested under arm64 QEMU/KVM with SIP and registered userspace conntrack
helpers. With conntrack events enabled, NFQA_CT/NFQA_EXP verdicts with
NLM_F_ECHO panicked on the original kernel. The changed kernel delivered
the UDP packet, created an expectation, and sent the event to the
requester. Both kernels completed without echo. With the default event
setting, a multicast subscriber also reproduced the original panic.
No deployed NFQUEUE program was tested.

 net/netfilter/nfnetlink_queue.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c
index 90d887546f7db..9fe2e85a2b3e0 100644
--- a/net/netfilter/nfnetlink_queue.c
+++ b/net/netfilter/nfnetlink_queue.c
@@ -1771,6 +1771,7 @@ static struct nf_conn *nfqnl_ct_parse(const struct nfnl_ct_hook *nfnl_ct,
 				      const struct nlmsghdr *nlh,
 				      const struct nlattr * const nfqa[],
 				      struct nf_queue_entry *entry,
+				      u32 portid,
 				      enum ip_conntrack_info *ctinfo)
 {
 #if IS_ENABLED(CONFIG_NF_CONNTRACK)
@@ -1785,7 +1786,7 @@ static struct nf_conn *nfqnl_ct_parse(const struct nfnl_ct_hook *nfnl_ct,
 
 	if (nfqa[NFQA_EXP])
 		nfnl_ct->attach_expect(nfqa[NFQA_EXP], ct,
-				      NETLINK_CB(entry->skb).portid,
+				      portid,
 				      nlmsg_report(nlh));
 	return ct;
 #else
@@ -1863,6 +1864,7 @@ static int nfqnl_recv_verdict(struct sk_buff *skb, const struct nfnl_info *info,
 	if (nfqa[NFQA_CT]) {
 		if (nfnl_ct != NULL)
 			ct = nfqnl_ct_parse(nfnl_ct, info->nlh, nfqa, entry,
+					    NETLINK_CB(skb).portid,
 					    &ctinfo);
 	}
 
Re: [PATCH net] netfilter: nfnetlink_queue: use verdict sender portid for expectation events
#15220
Author: netdev-bot+sinfo
Date: Thu, 12 Nov 2026 14:22
18 lines
8365 bytes
Hi!

This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:

 - How the issue was discovered, e.g. hit in production, hit during
   development, syzbot report, manual code inspection, LLM or static
   analysis tool scan.

Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account. If the series needs another revision for
other reasons, please include the information in the commit messages
then.

The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.
Re: [PATCH net] netfilter: nfnetlink_queue: use verdict sender portid for expectation events
#15252
Author: "Baek Kyu, Kim"
Date: Thu, 12 Nov 2026 14:34
8 lines
11389 bytes
NFQUEUE의 κ΄€λ ¨ verdict μˆ˜μ • 사항을 κ²€ν† ν•œ λ’€, μΈμ ‘ν•œ expectation 처리 경둜λ₯Ό μˆ˜λ™μœΌλ‘œ μ‚΄νŽ΄λ³΄λ‹€κ°€ portid의 μΆœμ²˜κ°€ 잘λͺ»λœ 것을 λ°œκ²¬ν–ˆμŠ΅λ‹ˆλ‹€. 이후 ARM64 QEMU/KVMμ—μ„œ `NFQA_CT`Β·`NFQA_EXP`Β·`NLM_F_ECHO`λ₯Ό μ‚¬μš©ν•΄ 원본 μ»€λ„μ˜ νŒ¨λ‹‰μ„ μž¬ν˜„ν•˜κ³ , μˆ˜μ • μ»€λ„μ—μ„œ 정상 λ™μž‘μ„ ν™•μΈν–ˆμŠ΅λ‹ˆλ‹€.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads