syzbot


WARNING: kmalloc bug in hash_ip_create

Status: fixed on 2022/03/08 16:11
Subsystems: netfilter
[Documentation on labels]
Reported-by: syzbot+3493b1873fb3ea827986@syzkaller.appspotmail.com
Fix commit: 7bbc3d385bd8 netfilter: ipset: Fix oversized kvmalloc() calls
First crash: 1128d, last: 1100d
Cause bisection: introduced by (bisect log) :
commit e6e7471706dc42cbe0e01278540c0730138d43e5
Author: Christoph Hellwig <hch@lst.de>
Date: Tue Jul 27 05:56:34 2021 +0000

  bvec: add a bvec_kmap_local helper

Crash: BUG: sleeping function called from invalid context in lock_sock_nested (log)
Repro: C syz .config
  
Discussions (11)
Title Replies (including bot) Last reply
[PATCH 4.14 00/75] 4.14.249-rc1 review 81 (81) 2021/10/07 16:21
[PATCH AUTOSEL 5.14 01/40] ext4: check and update i_disksize properly 44 (44) 2021/10/06 15:12
[PATCH 5.4 00/56] 5.4.151-rc1 review 62 (62) 2021/10/05 06:56
[PATCH 4.9 00/57] 4.9.285-rc1 review 62 (62) 2021/10/05 06:54
[PATCH 4.19 00/95] 4.19.209-rc1 review 103 (103) 2021/10/05 06:47
[PATCH 5.14 000/172] 5.14.10-rc1 review 184 (184) 2021/10/05 06:41
[PATCH 5.10 00/93] 5.10.71-rc1 review 100 (100) 2021/10/05 02:40
[PATCH 4.4 00/41] 4.4.286-rc1 review 45 (45) 2021/10/05 02:13
[PATCH net 00/15] Netfilter/IPVS fixes for net 17 (17) 2021/09/25 03:40
[PATCH 1/1] netfilter: ipset: Fix oversized kvmalloc() calls 2 (2) 2021/09/13 22:50
[syzbot] WARNING: kmalloc bug in hash_ip_create 2 (4) 2021/09/06 16:17

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 0 PID: 6509 at mm/util.c:597 kvmalloc_node+0x111/0x120 mm/util.c:597
Modules linked in:
CPU: 0 PID: 6509 Comm: syz-executor876 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:ffffc900012ef280 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffffc900012ef3a0 RCX: 0000000000000000
RDX: ffff888079461c80 RSI: ffffffff81a56291 RDI: 0000000000000003
RBP: 0000000000400dc0 R08: 000000007fffffff R09: ffff8880b9c32a0b
R10: ffffffff81a5624e R11: 000000000000001f R12: 0000000200000018
R13: 0000000000000000 R14: 00000000ffffffff R15: ffff888144271a00
FS:  00005555555be300(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fe72a6356c0 CR3: 000000001a5f5000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 hash_ip_create+0x4bb/0x13d0 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+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:0x7f7902e461b9
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:00007ffe24635288 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f7902e461b9
RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000003
RBP: 00007f7902e0a1a0 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000246 R12: 00007f7902e0a230
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000

Crashes (641):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/10/01 04:11 upstream 02d5e016800d 1d849ab4 .config console log report syz C ci-upstream-kasan-gce WARNING: kmalloc bug in hash_ip_create
2021/10/01 02:47 upstream 02d5e016800d 1d849ab4 .config console log report syz C ci-upstream-kasan-gce WARNING: kmalloc bug in hash_ip_create
2021/10/01 00:33 upstream 02d5e016800d 1d849ab4 .config console log report syz C ci-upstream-kasan-gce WARNING: kmalloc bug in hash_ip_create
2021/09/03 13:17 upstream a9c9a6f741cd f62a5829 .config console log report syz C ci-upstream-kasan-gce-root WARNING: kmalloc bug in hash_ip_create
2021/09/03 12:41 upstream a9c9a6f741cd f62a5829 .config console log report syz C ci-upstream-kasan-gce-smack-root WARNING: kmalloc bug in hash_ip_create
2021/09/03 11:28 upstream a9c9a6f741cd f62a5829 .config console log report syz C ci-upstream-kasan-gce WARNING: kmalloc bug in hash_ip_create
2021/10/01 06:15 upstream 02d5e016800d 1d849ab4 .config console log report info ci-upstream-kasan-gce-root WARNING: kmalloc bug in hash_ip_create
2021/10/01 05:55 upstream 02d5e016800d 1d849ab4 .config console log report info ci-upstream-kasan-gce-root WARNING: kmalloc bug in hash_ip_create
2021/09/30 09:59 upstream 02d5e016800d be530f6c .config console log report info ci-upstream-kasan-gce WARNING: kmalloc bug in hash_ip_create
2021/09/29 21:18 upstream 02d5e016800d be530f6c .config console log report info ci-upstream-kasan-gce-selinux-root WARNING: kmalloc bug in hash_ip_create
2021/09/29 19:43 upstream 02d5e016800d be530f6c .config console log report info ci-upstream-kasan-gce-selinux-root WARNING: kmalloc bug in hash_ip_create
2021/09/29 18:38 upstream 02d5e016800d be530f6c .config console log report info ci-upstream-kasan-gce-root WARNING: kmalloc bug in hash_ip_create
2021/09/29 18:02 upstream 02d5e016800d be530f6c .config console log report info ci-upstream-kasan-gce-root WARNING: kmalloc bug in hash_ip_create
2021/09/29 08:49 upstream a4e6f95a891a d82cb927 .config console log report info ci-upstream-kasan-gce-smack-root WARNING: kmalloc bug in hash_ip_create
2021/09/28 21:33 upstream d33bec7b3dfa d82cb927 .config console log report info ci-upstream-kasan-gce-selinux-root WARNING: kmalloc bug in hash_ip_create
2021/09/28 20:20 upstream d33bec7b3dfa d82cb927 .config console log report info ci-upstream-kasan-gce-smack-root WARNING: kmalloc bug in hash_ip_create
2021/09/28 18:41 upstream d33bec7b3dfa d82cb927 .config console log report info ci-upstream-kasan-gce WARNING: kmalloc bug in hash_ip_create
2021/09/28 12:02 upstream 0513e464f900 78494d16 .config console log report info ci-upstream-kasan-gce-root WARNING: kmalloc bug in hash_ip_create
2021/09/28 11:42 upstream 0513e464f900 78494d16 .config console log report info ci-upstream-kasan-gce-smack-root WARNING: kmalloc bug in hash_ip_create
2021/09/28 09:47 upstream 0513e464f900 78494d16 .config console log report info ci-upstream-kasan-gce-selinux-root WARNING: kmalloc bug in hash_ip_create
2021/09/28 08:39 upstream 0513e464f900 78494d16 .config console log report info ci-upstream-kasan-gce-selinux-root WARNING: kmalloc bug in hash_ip_create
2021/09/28 07:36 upstream 0513e464f900 78494d16 .config console log report info ci-upstream-kasan-gce-smack-root WARNING: kmalloc bug in hash_ip_create
2021/09/28 05:59 upstream 0513e464f900 78494d16 .config console log report info ci-upstream-kasan-gce-smack-root WARNING: kmalloc bug in hash_ip_create
2021/09/25 14:23 upstream 7d42e9818258 8cac236e .config console log report info ci-upstream-kasan-gce WARNING: kmalloc bug in hash_ip_create
2021/09/22 22:47 upstream cf1d2c3e7e2f 8cac236e .config console log report info ci-upstream-kasan-gce-root WARNING: kmalloc bug in hash_ip_create
2021/09/22 22:38 upstream cf1d2c3e7e2f 8cac236e .config console log report info ci-upstream-kasan-gce-root WARNING: kmalloc bug in hash_ip_create
2021/09/22 21:11 upstream cf1d2c3e7e2f 8cac236e .config console log report info ci-upstream-kasan-gce WARNING: kmalloc bug in hash_ip_create
2021/09/22 15:39 upstream 92477dd1faa6 169724fe .config console log report info ci-upstream-kasan-gce-selinux-root WARNING: kmalloc bug in hash_ip_create
2021/09/22 15:17 upstream 92477dd1faa6 169724fe .config console log report info ci-upstream-kasan-gce-selinux-root WARNING: kmalloc bug in hash_ip_create
2021/09/22 01:30 upstream d9fb678414c0 169724fe .config console log report info ci-upstream-kasan-gce-root WARNING: kmalloc bug in hash_ip_create
2021/09/21 18:41 upstream d9fb678414c0 169724fe .config console log report info ci-upstream-kasan-gce WARNING: kmalloc bug in hash_ip_create
2021/09/21 02:40 upstream e4e737bb5c17 af796c18 .config console log report info ci-upstream-kasan-gce-root WARNING: kmalloc bug in hash_ip_create
2021/09/20 12:50 upstream 20621d2f27a0 70b76c1d .config console log report info ci-upstream-kasan-gce-smack-root WARNING: kmalloc bug in hash_ip_create
2021/09/19 16:20 upstream d4d016caa4b8 70b76c1d .config console log report info ci-upstream-kasan-gce-selinux-root WARNING: kmalloc bug in hash_ip_create
2021/09/18 07:23 upstream ddf21bd8ab98 70b76c1d .config console log report info ci-upstream-kasan-gce-smack-root WARNING: kmalloc bug in hash_ip_create
2021/09/18 00:05 upstream ddf21bd8ab98 70b76c1d .config console log report info ci-upstream-kasan-gce WARNING: kmalloc bug in hash_ip_create
2021/09/15 15:26 upstream 3ca706c189db 07e953c1 .config console log report info ci-upstream-kasan-gce-smack-root WARNING: kmalloc bug in hash_ip_create
2021/09/15 14:26 upstream 3ca706c189db 07e953c1 .config console log report info ci-upstream-kasan-gce-selinux-root WARNING: kmalloc bug in hash_ip_create
2021/09/15 13:38 upstream 3ca706c189db 07e953c1 .config console log report info ci-upstream-kasan-gce WARNING: kmalloc bug in hash_ip_create
2021/09/03 06:54 upstream a9c9a6f741cd 15cea0a3 .config console log report info ci-upstream-kasan-gce WARNING: kmalloc bug in hash_ip_create
2021/10/01 02:25 upstream 02d5e016800d 1d849ab4 .config console log report info ci-upstream-kasan-gce-386 WARNING: kmalloc bug in hash_ip_create
2021/09/29 20:15 upstream 02d5e016800d be530f6c .config console log report info ci-upstream-kasan-gce-386 WARNING: kmalloc bug in hash_ip_create
2021/09/28 06:38 upstream 0513e464f900 78494d16 .config console log report info ci-upstream-kasan-gce-386 WARNING: kmalloc bug in hash_ip_create
2021/09/21 02:33 upstream e4e737bb5c17 af796c18 .config console log report info ci-upstream-kasan-gce-386 WARNING: kmalloc bug in hash_ip_create
2021/09/19 23:59 upstream bc1abb9e55ce 70b76c1d .config console log report info ci-upstream-kasan-gce-386 WARNING: kmalloc bug in hash_ip_create
2021/09/19 02:54 upstream d4d016caa4b8 70b76c1d .config console log report info ci-upstream-kasan-gce-386 WARNING: kmalloc bug in hash_ip_create
2021/09/18 02:17 upstream ddf21bd8ab98 70b76c1d .config console log report info ci-upstream-kasan-gce-386 WARNING: kmalloc bug in hash_ip_create
2021/09/15 18:38 upstream 3ca706c189db 07e953c1 .config console log report info ci-upstream-kasan-gce-386 WARNING: kmalloc bug in hash_ip_create
2021/09/15 12:32 upstream 3ca706c189db 07e953c1 .config console log report info ci-upstream-kasan-gce-386 WARNING: kmalloc bug in hash_ip_create
2021/09/21 19:47 net-old 3e95cfa24e24 169724fe .config console log report info ci-upstream-net-this-kasan-gce WARNING: kmalloc bug in hash_ip_create
2021/09/19 20:44 net-old 87758511075e 70b76c1d .config console log report info ci-upstream-net-this-kasan-gce WARNING: kmalloc bug in hash_ip_create
2021/09/29 16:18 net-next-old b69c99463d41 be530f6c .config console log report info ci-upstream-net-kasan-gce WARNING: kmalloc bug in hash_ip_create
2021/09/19 02:07 net-next-old 983e59a27b92 70b76c1d .config console log report info ci-upstream-net-kasan-gce WARNING: kmalloc bug in hash_ip_create
2021/09/18 18:11 net-next-old 0efcc3f20145 70b76c1d .config console log report info ci-upstream-net-kasan-gce WARNING: kmalloc bug in hash_ip_create
2021/09/12 10:33 linux-next aa14a3016182 5ae8508a .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING: kmalloc bug in hash_ip_create
* Struck through repros no longer work on HEAD.