syzbot


WARNING: kmalloc bug in nf_tables_newset
Status: fixed on 2022/03/08 16:11
Reported-by: syzbot+cd43695a64bcd21b8596@syzkaller.appspotmail.com
Fix commit: 45928afe94a0 netfilter: nf_tables: Fix oversized kvmalloc() calls
First crash: 266d, last: 238d

Cause bisection: introduced by (bisect log) :
commit 7661809d493b426e979f39ab512e3adf41fbcc69
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Wed Jul 14 16:45:49 2021 +0000

  mm: don't allow oversized kvmalloc() calls

Crash: WARNING: kmalloc bug in nf_tables_newset (log)
Repro: C syz .config

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 1 PID: 6541 at mm/util.c:597 kvmalloc_node+0x111/0x120 mm/util.c:597
Modules linked in:
CPU: 0 PID: 6541 Comm: syz-executor122 Not tainted 5.15.0-rc3-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:kvmalloc_node+0x111/0x120 mm/util.c:597
Code: 01 00 00 00 4c 89 e7 e8 ad 18 0d 00 49 89 c5 e9 69 ff ff ff e8 f0 98 d0 ff 41 89 ed 41 81 cd 00 20 01 00 eb 95 e8 df 98 d0 ff <0f> 0b e9 4c ff ff ff 0f 1f 84 00 00 00 00 00 55 48 89 fd 53 e8 c6
RSP: 0018:ffffc9000b89f330 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff8880794b1c80 RSI: ffffffff81a56291 RDI: 0000000000000003
RBP: 0000000000000dc0 R08: 000000007fffffff R09: ffff8880b9d32a0b
R10: ffffffff81a5624e R11: 0000000000000000 R12: 0000000400000108
R13: 0000000000000000 R14: 00000000ffffffff R15: dffffc0000000000
FS:  0000555555686300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fabdcbfa008 CR3: 000000006e938000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 kvmalloc include/linux/mm.h:805 [inline]
 kvzalloc include/linux/mm.h:813 [inline]
 nf_tables_newset+0x1512/0x3340 net/netfilter/nf_tables_api.c:4341
 nfnetlink_rcv_batch+0x1710/0x25f0 net/netfilter/nfnetlink.c:513
 nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:634 [inline]
 nfnetlink_rcv+0x3af/0x420 net/netfilter/nfnetlink.c:652
 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline]
 netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1340
 netlink_sendmsg+0x86d/0xdb0 net/netlink/af_netlink.c:1929
 sock_sendmsg_nosec net/socket.c:704 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:724
 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2409
 ___sys_sendmsg+0xf3/0x170 net/socket.c:2463
 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2492
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f6256205319
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffec0e02988 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f6256205319
RDX: 0000000000000000 RSI: 0000000020000040 RDI: 0000000000000003
RBP: 00007f62561c9300 R08: 0000000000000a00 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000246 R12: 00007f62561c9390
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000

Crashes (95):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce 2021/10/01 03:27 upstream 02d5e016800d 1d849ab4 .config log report syz C WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce 2021/10/01 03:07 upstream 02d5e016800d 1d849ab4 .config log report syz C WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce 2021/10/01 00:53 upstream 02d5e016800d 1d849ab4 .config log report syz C WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce-root 2021/09/03 12:57 upstream a9c9a6f741cd f62a5829 .config log report syz C WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce-smack-root 2021/09/03 12:42 upstream a9c9a6f741cd f62a5829 .config log report syz C WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce-selinux-root 2021/09/03 11:54 upstream a9c9a6f741cd f62a5829 .config log report syz C WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce 2021/09/03 11:35 upstream a9c9a6f741cd f62a5829 .config log report syz C WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce-root 2021/09/28 12:36 upstream 0513e464f900 78494d16 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce-selinux-root 2021/09/28 11:13 upstream 0513e464f900 78494d16 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce 2021/09/28 06:38 upstream 0513e464f900 78494d16 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce-selinux-root 2021/09/28 05:22 upstream 0513e464f900 78494d16 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce-selinux-root 2021/09/23 04:38 upstream cf1d2c3e7e2f 8cac236e .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce 2021/09/20 21:36 upstream e8f71f89236e af796c18 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce-smack-root 2021/09/17 10:15 upstream bdb575f87217 5b989942 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce-selinux-root 2021/09/10 22:30 upstream bf9f243f23e6 5ae8508a .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce 2021/09/10 20:47 upstream bf9f243f23e6 5ae8508a .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce 2021/09/09 07:56 upstream 0f4b9289bad3 e2776ee4 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce 2021/09/07 16:23 upstream 4b93c544e90e 6ca60148 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce-smack-root 2021/09/06 00:34 upstream 0319b848b155 d236a457 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce-smack-root 2021/09/05 23:41 upstream 0319b848b155 d236a457 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce 2021/09/05 23:05 upstream 0319b848b155 d236a457 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce-root 2021/09/03 10:55 upstream a9c9a6f741cd f62a5829 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce 2021/09/03 10:37 upstream a9c9a6f741cd f62a5829 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce-smack-root 2021/09/03 10:22 upstream a9c9a6f741cd f62a5829 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce-smack-root 2021/09/03 10:20 upstream a9c9a6f741cd f62a5829 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce 2021/09/03 10:09 upstream a9c9a6f741cd f62a5829 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce-selinux-root 2021/09/03 09:59 upstream a9c9a6f741cd f62a5829 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce-root 2021/09/03 09:57 upstream a9c9a6f741cd f62a5829 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce-smack-root 2021/09/03 09:57 upstream a9c9a6f741cd f62a5829 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce-386 2021/09/28 09:34 upstream 0513e464f900 78494d16 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce-386 2021/09/22 17:13 upstream 92477dd1faa6 169724fe .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce-386 2021/09/05 23:08 upstream 0319b848b155 d236a457 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce-386 2021/09/03 11:01 upstream a9c9a6f741cd f62a5829 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-kasan-gce-386 2021/09/03 06:45 upstream a9c9a6f741cd 15cea0a3 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-net-this-kasan-gce 2021/09/22 20:15 net 977d293e23b4 8cac236e .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-net-this-kasan-gce 2021/09/08 02:11 net 626bf91a292e 064c9eb7 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-net-this-kasan-gce 2021/09/08 00:07 net 626bf91a292e 064c9eb7 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-net-kasan-gce 2021/10/01 09:31 net-next 69508d43334e 1d849ab4 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-net-kasan-gce 2021/09/26 19:29 net-next d59bdda85eb7 8cac236e .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-net-kasan-gce 2021/09/26 03:38 net-next 24aa160d5375 8cac236e .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-net-kasan-gce 2021/09/25 06:54 net-next acde891c243c 8cac236e .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-net-kasan-gce 2021/09/23 03:03 net-next 428168f99517 8cac236e .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-net-kasan-gce 2021/09/22 18:56 net-next 428168f99517 8cac236e .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-net-kasan-gce 2021/09/20 20:06 net-next 85c698863c15 af796c18 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-net-kasan-gce 2021/09/15 01:16 net-next 55bd079a3cb6 07e953c1 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-net-kasan-gce 2021/09/12 12:23 net-next 626bf91a292e 5ae8508a .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-net-kasan-gce 2021/09/11 05:09 net-next 626bf91a292e 5ae8508a .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-net-kasan-gce 2021/09/08 22:41 net-next 626bf91a292e e2776ee4 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-net-kasan-gce 2021/09/07 14:48 net-next 27151f177827 6ca60148 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-net-kasan-gce 2021/09/06 15:04 net-next 27151f177827 6ca60148 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-net-kasan-gce 2021/09/06 14:18 net-next 27151f177827 6ca60148 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-linux-next-kasan-gce-root 2021/09/17 14:26 linux-next 9004fd387338 5b989942 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-linux-next-kasan-gce-root 2021/09/09 12:48 linux-next f7f581157d1c e2776ee4 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-linux-next-kasan-gce-root 2021/09/07 12:30 linux-next b2bb710d34d5 6ca60148 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-linux-next-kasan-gce-root 2021/09/07 12:19 linux-next b2bb710d34d5 6ca60148 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-linux-next-kasan-gce-root 2021/09/07 09:52 linux-next b2bb710d34d5 6ca60148 .config log report info WARNING: kmalloc bug in nf_tables_newset
ci-upstream-linux-next-kasan-gce-root 2021/09/07 09:27 linux-next b2bb710d34d5 6ca60148 .config log report info WARNING: kmalloc bug in nf_tables_newset