syzbot


WARNING: kmalloc bug in hash_ipportip_create

Status: closed as dup on 2021/09/15 05:11
Subsystems: netfilter
[Documentation on labels]
Reported-by: syzbot+30aea515bdd9616dd4e9@syzkaller.appspotmail.com
First crash: 1197d, last: 1180d
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 hash_ipportip_create (log)
Repro: C syz .config
  
Duplicate of
Title Repro Cause bisect Fix bisect Count Last Reported
WARNING: kmalloc bug in hash_net_create netfilter C done 283 1177d 1204d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] WARNING: kmalloc bug in hash_ipportip_create 1 (2) 2021/09/15 05:11

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 1 PID: 6538 at mm/util.c:597 kvmalloc_node+0x111/0x120 mm/util.c:597
Modules linked in:
CPU: 1 PID: 6538 Comm: syz-executor249 Not tainted 5.14.0-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 8d 18 0d 00 49 89 c5 e9 69 ff ff ff e8 10 9d d0 ff 41 89 ed 41 81 cd 00 20 01 00 eb 95 e8 ff 9c d0 ff <0f> 0b e9 4c ff ff ff 0f 1f 84 00 00 00 00 00 55 48 89 fd 53 e8 e6
RSP: 0018:ffffc900025af268 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffffc900025af380 RCX: 0000000000000000
RDX: ffff888025433900 RSI: ffffffff81a57041 RDI: 0000000000000003
RBP: 0000000000400dc0 R08: 000000007fffffff R09: ffff8880b9d32a0b
R10: ffffffff81a56ffe R11: 000000000000001f R12: 0000000400000018
R13: 0000000000000000 R14: 00000000ffffffff R15: ffff88807bbce000
FS:  0000000001a7d300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f7269e1d6c0 CR3: 000000006f6c6000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 hash_ipportip_create+0x3dd/0x1220 net/netfilter/ipset/ip_set_hash_gen.h:1524
 ip_set_create+0x782/0x15a0 net/netfilter/ipset/ip_set_core.c:1100
 nfnetlink_rcv_msg+0xbc9/0x13f0 net/netfilter/nfnetlink.c:296
 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2504
 nfnetlink_rcv+0x1ac/0x420 net/netfilter/nfnetlink.c:654
 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+0xf3/0x1c0 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:0x43f029
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:00007ffd69914258 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 000000000043f029
RDX: 0000000000000000 RSI: 0000000020000000 RDI: 0000000000000003
RBP: 0000000000403010 R08: 0000000000000005 R09: 0000000000400488
R10: 0000000000000004 R11: 0000000000000246 R12: 00000000004030a0
R13: 0000000000000000 R14: 00000000004ac018 R15: 0000000000400488

Crashes (31):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/09/10 13:00 upstream bf9f243f23e6 5ae8508a .config console log report syz C ci-upstream-kasan-gce WARNING: kmalloc bug in hash_ipportip_create
2021/09/10 13:25 net-old 20e100f52730 5ae8508a .config console log report syz C ci-upstream-net-this-kasan-gce WARNING: kmalloc bug in hash_ipportip_create
2021/09/10 14:53 net-next-old 626bf91a292e 5ae8508a .config console log report syz C ci-upstream-net-kasan-gce WARNING: kmalloc bug in hash_ipportip_create
2021/09/21 06:49 upstream e4e737bb5c17 af796c18 .config console log report info ci-upstream-kasan-gce-selinux-root WARNING: kmalloc bug in hash_ipportip_create
2021/09/21 06:46 upstream e8f71f89236e af796c18 .config console log report info ci-upstream-kasan-gce WARNING: kmalloc bug in hash_ipportip_create
2021/09/21 06:43 upstream e4e737bb5c17 af796c18 .config console log report info ci-upstream-kasan-gce-root WARNING: kmalloc bug in hash_ipportip_create
2021/09/21 06:41 upstream e4e737bb5c17 af796c18 .config console log report info ci-upstream-kasan-gce-smack-root WARNING: kmalloc bug in hash_ipportip_create
2021/09/17 16:42 upstream bdb575f87217 5b989942 .config console log report info ci-upstream-kasan-gce WARNING: kmalloc bug in hash_ipportip_create
2021/09/17 16:40 upstream bdb575f87217 5b989942 .config console log report info ci-upstream-kasan-gce-root WARNING: kmalloc bug in hash_ipportip_create
2021/09/17 16:34 upstream bdb575f87217 5b989942 .config console log report info ci-upstream-kasan-gce-smack-root WARNING: kmalloc bug in hash_ipportip_create
2021/09/11 10:38 upstream 926de8c4326c 5ae8508a .config console log report info ci-upstream-kasan-gce WARNING: kmalloc bug in hash_ipportip_create
2021/09/11 10:25 upstream 926de8c4326c 5ae8508a .config console log report info ci-upstream-kasan-gce-smack-root WARNING: kmalloc bug in hash_ipportip_create
2021/09/11 10:24 upstream 926de8c4326c 5ae8508a .config console log report info ci-upstream-kasan-gce-selinux-root WARNING: kmalloc bug in hash_ipportip_create
2021/09/11 10:23 upstream 926de8c4326c 5ae8508a .config console log report info ci-upstream-kasan-gce-root WARNING: kmalloc bug in hash_ipportip_create
2021/09/11 01:00 upstream bf9f243f23e6 5ae8508a .config console log report info ci-upstream-kasan-gce-root WARNING: kmalloc bug in hash_ipportip_create
2021/09/11 00:55 upstream bf9f243f23e6 5ae8508a .config console log report info ci-upstream-kasan-gce-selinux-root WARNING: kmalloc bug in hash_ipportip_create
2021/09/11 00:54 upstream bf9f243f23e6 5ae8508a .config console log report info ci-upstream-kasan-gce-smack-root WARNING: kmalloc bug in hash_ipportip_create
2021/09/11 00:47 upstream bf9f243f23e6 5ae8508a .config console log report info ci-upstream-kasan-gce WARNING: kmalloc bug in hash_ipportip_create
2021/09/10 14:32 upstream bf9f243f23e6 5ae8508a .config console log report info ci-upstream-kasan-gce-selinux-root WARNING: kmalloc bug in hash_ipportip_create
2021/09/10 14:10 upstream bf9f243f23e6 5ae8508a .config console log report info ci-upstream-kasan-gce-root WARNING: kmalloc bug in hash_ipportip_create
2021/09/10 13:55 upstream bf9f243f23e6 5ae8508a .config console log report info ci-upstream-kasan-gce-smack-root WARNING: kmalloc bug in hash_ipportip_create
2021/09/10 12:42 upstream bf9f243f23e6 5ae8508a .config console log report info ci-upstream-kasan-gce WARNING: kmalloc bug in hash_ipportip_create
2021/09/21 06:44 upstream e4e737bb5c17 af796c18 .config console log report info ci-upstream-kasan-gce-386 WARNING: kmalloc bug in hash_ipportip_create
2021/09/11 10:54 upstream 926de8c4326c 5ae8508a .config console log report info ci-upstream-kasan-gce-386 WARNING: kmalloc bug in hash_ipportip_create
2021/09/10 12:34 upstream bf9f243f23e6 5ae8508a .config console log report info ci-upstream-kasan-gce-386 WARNING: kmalloc bug in hash_ipportip_create
2021/09/28 04:32 net-next-old b69c99463d41 78494d16 .config console log report info ci-upstream-net-kasan-gce WARNING: kmalloc bug in hash_ipportip_create
2021/09/26 09:17 net-next-old 24aa160d5375 8cac236e .config console log report info ci-upstream-net-kasan-gce WARNING: kmalloc bug in hash_ipportip_create
2021/09/25 11:05 net-next-old acde891c243c 8cac236e .config console log report info ci-upstream-net-kasan-gce WARNING: kmalloc bug in hash_ipportip_create
2021/09/11 10:34 linux-next aa14a3016182 5ae8508a .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING: kmalloc bug in hash_ipportip_create
2021/09/11 00:50 linux-next aa14a3016182 5ae8508a .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING: kmalloc bug in hash_ipportip_create
2021/09/10 14:21 linux-next aa14a3016182 5ae8508a .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING: kmalloc bug in hash_ipportip_create
* Struck through repros no longer work on HEAD.