Pablo Neira Ayuso
120f1c857a
net: flow_dissector: use DEBUG_NET_WARN_ON_ONCE
The following splat is easy to reproduce upstream as well as in -stable
kernels. Florian Westphal provided the following commit:
d1dab4f71d ("net: add and use __skb_get_hash_symmetric_net")
but this complementary fix has been also suggested by Willem de Bruijn
and it can be easily backported to -stable kernel which consists in
using DEBUG_NET_WARN_ON_ONCE instead to silence the following splat
given __skb_get_hash() is used by the nftables tracing infrastructure to
to identify packets in traces.
[69133.561393] ------------[ cut here ]------------
[69133.561404] WARNING: CPU: 0 PID: 43576 at net/core/flow_dissector.c:1104 __skb_flow_dissect+0x134f/
[...]
[69133.561944] CPU: 0 PID: 43576 Comm: socat Not tainted 6.10.0-rc7+ #379
[69133.561959] RIP: 0010:__skb_flow_dissect+0x134f/0x2ad0
[69133.561970] Code: 83 f9 04 0f 84 b3 00 00 00 45 85 c9 0f 84 aa 00 00 00 41 83 f9 02 0f 84 81 fc ff
ff 44 0f b7 b4 24 80 00 00 00 e9 8b f9 ff ff <0f> 0b e9 20 f3 ff ff 41 f6 c6 20 0f 84 e4 ef ff ff 48 8d 7b 12 e8
[69133.561979] RSP: 0018:ffffc90000006fc0 EFLAGS: 00010246
[69133.561988] RAX: 0000000000000000 RBX: ffffffff82f33e20 RCX: ffffffff81ab7e19
[69133.561994] RDX: dffffc0000000000 RSI: ffffc90000007388 RDI: ffff888103a1b418
[69133.562001] RBP: ffffc90000007310 R08: 0000000000000000 R09: 0000000000000000
[69133.562007] R10: ffffc90000007388 R11: ffffffff810cface R12: ffff888103a1b400
[69133.562013] R13: 0000000000000000 R14: ffffffff82f33e2a R15: ffffffff82f33e28
[69133.562020] FS: 00007f40f7131740(0000) GS:ffff888390800000(0000) knlGS:0000000000000000
[69133.562027] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[69133.562033] CR2: 00007f40f7346ee0 CR3: 000000015d200001 CR4: 00000000001706f0
[69133.562040] Call Trace:
[69133.562044] <IRQ>
[69133.562049] ? __warn+0x9f/0x1a0
[ 1211.841384] ? __skb_flow_dissect+0x107e/0x2860
[...]
[ 1211.841496] ? bpf_flow_dissect+0x160/0x160
[ 1211.841753] __skb_get_hash+0x97/0x280
[ 1211.841765] ? __skb_get_hash_symmetric+0x230/0x230
[ 1211.841776] ? mod_find+0xbf/0xe0
[ 1211.841786] ? get_stack_info_noinstr+0x12/0xe0
[ 1211.841798] ? bpf_ksym_find+0x56/0xe0
[ 1211.841807] ? __rcu_read_unlock+0x2a/0x70
[ 1211.841819] nft_trace_init+0x1b9/0x1c0 [nf_tables]
[ 1211.841895] ? nft_trace_notify+0x830/0x830 [nf_tables]
[ 1211.841964] ? get_stack_info+0x2b/0x80
[ 1211.841975] ? nft_do_chain_arp+0x80/0x80 [nf_tables]
[ 1211.842044] nft_do_chain+0x79c/0x850 [nf_tables]
Fixes: 9b52e3f267 ("flow_dissector: handle no-skb use case")
Suggested-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20240715141442.43775-1-pablo@netfilter.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2024-07-18 10:52:17 +02:00
..
2024-03-29 15:06:02 -07:00
2024-07-11 12:58:13 -07:00
2024-04-15 10:26:35 +01:00
2022-04-07 20:32:09 -07:00
2024-07-15 08:02:26 -07:00
2024-07-11 18:11:31 -07:00
2024-06-24 16:41:23 -07:00
2024-06-19 12:44:22 +01:00
2024-06-03 18:50:09 -07:00
2024-02-06 11:45:53 +01:00
2022-12-12 15:18:25 -08:00
2024-04-12 19:09:31 -07:00
2024-07-10 09:58:52 -07:00
2024-07-18 10:52:17 +02:00
2023-08-02 10:09:32 +01:00
2024-06-06 11:52:52 +02:00
2022-10-28 20:13:54 -07:00
2024-03-07 21:12:42 -08:00
2024-05-13 14:44:06 -07:00
2024-03-07 21:12:41 -08:00
2024-04-30 18:46:52 -07:00
2024-05-08 10:35:09 +01:00
2024-02-14 11:20:13 +00:00
2024-06-24 16:41:24 -07:00
2022-10-12 10:45:51 +02:00
2024-05-08 10:35:09 +01:00
2024-05-28 19:49:47 -07:00
2024-06-18 10:59:52 +02:00
2024-04-01 10:49:28 +01:00
2024-04-01 11:28:32 +01:00
2024-07-11 18:11:31 -07:00
2023-07-07 09:16:52 +01:00
2023-10-16 16:36:53 -07:00
2024-04-23 10:09:49 -07:00
2024-03-07 21:13:25 -08:00
2024-06-14 18:04:29 -07:00
2024-04-30 19:03:47 -07:00
2023-07-27 20:33:16 -07:00
2023-11-28 15:48:39 +01:00
2024-03-07 10:29:36 -08:00
2024-07-10 10:28:23 -07:00
2023-12-27 14:34:52 +00:00
2024-01-19 21:13:25 -08:00
2024-07-11 17:13:58 -07:00
2024-05-10 18:52:45 -07:00
2022-07-20 10:14:49 +01:00
2023-10-28 11:29:27 +01:00
2024-07-02 18:59:33 -07:00
2024-07-09 10:24:50 +02:00
2024-06-06 11:52:52 +02:00
2024-05-28 12:05:19 +02:00
2022-10-25 11:35:16 +02:00
2024-06-20 13:49:59 -07:00
2023-12-15 10:48:51 +00:00
2024-06-01 16:03:21 -07:00
2024-07-15 08:02:26 -07:00
2022-12-12 15:04:39 -08:00
2022-11-01 21:14:39 -07:00
2024-07-14 20:40:21 -07:00