Eric Dumazet
ba062ebb2c
netfilter: nf_queue: augment nfqa_cfg_policy
Three attributes are currently not verified, thus can trigger KMSAN
warnings such as :
BUG: KMSAN: uninit-value in __arch_swab32 arch/x86/include/uapi/asm/swab.h:10 [inline]
BUG: KMSAN: uninit-value in __fswab32 include/uapi/linux/swab.h:59 [inline]
BUG: KMSAN: uninit-value in nfqnl_recv_config+0x939/0x17d0 net/netfilter/nfnetlink_queue.c:1268
CPU: 1 PID: 4521 Comm: syz-executor120 Not tainted 4.17.0+ #5
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x185/0x1d0 lib/dump_stack.c:113
kmsan_report+0x188/0x2a0 mm/kmsan/kmsan.c:1117
__msan_warning_32+0x70/0xc0 mm/kmsan/kmsan_instr.c:620
__arch_swab32 arch/x86/include/uapi/asm/swab.h:10 [inline]
__fswab32 include/uapi/linux/swab.h:59 [inline]
nfqnl_recv_config+0x939/0x17d0 net/netfilter/nfnetlink_queue.c:1268
nfnetlink_rcv_msg+0xb2e/0xc80 net/netfilter/nfnetlink.c:212
netlink_rcv_skb+0x37e/0x600 net/netlink/af_netlink.c:2448
nfnetlink_rcv+0x2fe/0x680 net/netfilter/nfnetlink.c:513
netlink_unicast_kernel net/netlink/af_netlink.c:1310 [inline]
netlink_unicast+0x1680/0x1750 net/netlink/af_netlink.c:1336
netlink_sendmsg+0x104f/0x1350 net/netlink/af_netlink.c:1901
sock_sendmsg_nosec net/socket.c:629 [inline]
sock_sendmsg net/socket.c:639 [inline]
___sys_sendmsg+0xec8/0x1320 net/socket.c:2117
__sys_sendmsg net/socket.c:2155 [inline]
__do_sys_sendmsg net/socket.c:2164 [inline]
__se_sys_sendmsg net/socket.c:2162 [inline]
__x64_sys_sendmsg+0x331/0x460 net/socket.c:2162
do_syscall_64+0x15b/0x230 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x43fd59
RSP: 002b:00007ffde0e30d28 EFLAGS: 00000213 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 000000000043fd59
RDX: 0000000000000000 RSI: 0000000020000080 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 00000000004002c8 R09: 00000000004002c8
R10: 00000000004002c8 R11: 0000000000000213 R12: 0000000000401680
R13: 0000000000401710 R14: 0000000000000000 R15: 0000000000000000
Uninit was created at:
kmsan_save_stack_with_flags mm/kmsan/kmsan.c:279 [inline]
kmsan_internal_poison_shadow+0xb8/0x1b0 mm/kmsan/kmsan.c:189
kmsan_kmalloc+0x94/0x100 mm/kmsan/kmsan.c:315
kmsan_slab_alloc+0x10/0x20 mm/kmsan/kmsan.c:322
slab_post_alloc_hook mm/slab.h:446 [inline]
slab_alloc_node mm/slub.c:2753 [inline]
__kmalloc_node_track_caller+0xb35/0x11b0 mm/slub.c:4395
__kmalloc_reserve net/core/skbuff.c:138 [inline]
__alloc_skb+0x2cb/0x9e0 net/core/skbuff.c:206
alloc_skb include/linux/skbuff.h:988 [inline]
netlink_alloc_large_skb net/netlink/af_netlink.c:1182 [inline]
netlink_sendmsg+0x76e/0x1350 net/netlink/af_netlink.c:1876
sock_sendmsg_nosec net/socket.c:629 [inline]
sock_sendmsg net/socket.c:639 [inline]
___sys_sendmsg+0xec8/0x1320 net/socket.c:2117
__sys_sendmsg net/socket.c:2155 [inline]
__do_sys_sendmsg net/socket.c:2164 [inline]
__se_sys_sendmsg net/socket.c:2162 [inline]
__x64_sys_sendmsg+0x331/0x460 net/socket.c:2162
do_syscall_64+0x15b/0x230 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x44/0xa9
Fixes: fdb694a01f ("netfilter: Add fail-open support")
Fixes: 829e17a1a6 ("[NETFILTER]: nfnetlink_queue: allow changing queue length through netlink")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2018-06-18 14:13:24 +02:00
..
2018-06-06 14:01:00 +02:00
2018-06-16 07:39:34 +09:00
2018-05-23 16:37:11 -04:00
2018-06-03 01:18:29 +02:00
2018-06-03 01:18:29 +02:00
2018-06-12 20:07:07 +02:00
2018-03-20 13:44:14 +01:00
2018-03-05 23:15:43 +01:00
2018-05-23 09:26:08 +02:00
2018-03-20 13:44:14 +01:00
2018-05-16 07:24:30 +02:00
2018-04-17 10:59:43 +02:00
2018-04-24 10:29:14 +02:00
2018-01-08 18:01:05 +01:00
2018-01-08 18:01:26 +01:00
2018-04-24 10:29:14 +02:00
2018-03-30 11:41:18 -04:00
2018-06-12 19:31:07 +02:00
2018-01-08 18:00:54 +01:00
2018-01-08 18:01:02 +01:00
2018-03-27 13:18:09 -04:00
2018-01-08 18:01:02 +01:00
2018-04-27 00:39:29 +02:00
2018-01-08 18:01:02 +01:00
2018-06-12 16:19:22 -07:00
2018-04-24 10:29:14 +02:00
2018-05-06 21:51:37 -04:00
2018-03-30 11:41:18 -04:00
2018-05-16 07:24:30 +02:00
2018-04-24 10:29:14 +02:00
2018-03-20 13:44:14 +01:00
2018-04-24 10:29:07 +02:00
2018-04-24 10:28:45 +02:00
2018-06-01 09:47:36 +02:00
2018-05-23 09:14:05 +02:00
2018-03-27 13:18:09 -04:00
2018-05-16 07:24:30 +02:00
2018-06-12 16:19:22 -07:00
2018-03-20 13:44:14 +01:00
2018-04-24 10:29:12 +02:00
2018-03-20 13:44:14 +01:00
2018-04-24 10:29:12 +02:00
2018-04-24 10:29:12 +02:00
2018-04-24 10:29:12 +02:00
2018-04-24 10:29:12 +02:00
2018-04-24 10:29:12 +02:00
2018-04-24 10:29:12 +02:00
2018-05-29 00:25:40 +02:00
2018-04-24 10:29:12 +02:00
2018-05-07 00:02:11 +02:00
2018-01-10 15:32:15 +01:00
2017-11-02 11:10:55 +01:00
2018-05-16 07:24:30 +02:00
2018-06-16 07:39:34 +09:00
2018-06-12 19:30:11 +02:00
2018-05-24 00:52:35 +02:00
2018-06-12 16:19:22 -07:00
2018-03-27 13:18:09 -04:00
2018-06-06 18:39:49 -07:00
2018-06-18 14:13:24 +02:00
2018-06-12 19:28:18 +02:00
2018-06-12 19:28:18 +02:00
2018-01-08 18:01:01 +01:00
2018-05-29 14:50:26 +02:00
2018-06-12 20:07:07 +02:00
2018-06-03 00:02:11 +02:00
2018-06-03 09:31:58 -04:00
2018-06-12 19:12:48 +02:00
2018-04-27 00:00:56 +02:00
2018-04-24 10:29:09 +02:00
2018-06-01 10:35:47 +02:00
2018-06-01 09:38:40 +02:00
2018-06-01 09:46:22 +02:00
2018-05-23 09:50:28 +02:00
2018-06-07 16:14:00 -04:00
2018-06-01 09:46:22 +02:00
2018-01-10 15:32:08 +01:00
2018-06-03 09:31:58 -04:00
2018-04-24 10:29:12 +02:00
2018-06-01 09:38:40 +02:00
2018-04-24 10:29:09 +02:00
2018-01-10 15:32:08 +01:00
2018-04-27 00:00:55 +02:00
2018-04-24 10:29:11 +02:00
2018-06-03 00:02:10 +02:00
2018-06-11 14:24:32 -07:00
2018-06-12 19:12:45 +02:00
2018-01-08 18:10:53 +01:00
2018-06-12 16:19:22 -07:00
2018-02-14 21:05:37 +01:00
2018-02-14 21:05:38 +01:00
2018-02-14 21:05:38 +01:00
2018-02-14 21:05:38 +01:00
2018-02-14 21:05:38 +01:00
2018-03-05 23:15:43 +01:00
2018-02-14 21:05:38 +01:00
2018-02-14 21:05:38 +01:00
2018-03-20 13:27:17 +01:00
2018-06-12 19:35:52 +02:00
2018-02-14 21:05:38 +01:00
2018-02-14 21:05:38 +01:00
2018-06-01 10:14:51 +02:00
2018-02-14 21:05:33 +01:00
2018-02-14 21:05:33 +01:00
2018-02-14 21:05:38 +01:00
2018-05-16 07:24:30 +02:00
2018-02-14 21:05:38 +01:00
2018-02-14 21:05:33 +01:00
2018-02-14 21:05:37 +01:00
2018-03-26 12:07:48 -04:00
2018-02-14 21:05:38 +01:00
2018-02-14 21:05:38 +01:00
2018-02-14 21:05:38 +01:00
2018-02-14 21:05:39 +01:00
2018-03-05 23:15:50 +01:00
2018-04-24 10:29:12 +02:00
2018-04-24 10:29:12 +02:00
2018-03-05 23:15:43 +01:00
2018-04-19 13:02:44 +02:00
2018-02-14 21:05:35 +01:00
2018-05-07 00:02:11 +02:00
2018-02-14 21:05:38 +01:00
2018-02-14 21:05:37 +01:00
2018-03-05 23:15:44 +01:00
2018-03-05 23:15:44 +01:00
2018-06-06 11:15:43 -07:00
2018-04-24 10:29:12 +02:00
2017-11-02 11:10:55 +01:00
2018-02-14 21:05:38 +01:00
2018-06-06 14:00:54 +02:00
2018-06-03 00:02:01 +02:00
2018-02-14 21:05:38 +01:00
2018-01-31 14:59:24 +01:00
2018-03-30 11:04:12 +02:00
2018-02-14 21:05:38 +01:00
2018-03-30 10:59:23 -04:00
2018-03-20 13:44:14 +01:00
2018-06-03 00:02:05 +02:00