syzbot


WARNING in smk_set_cipso (2)

Status: fixed on 2021/11/10 00:50
Reported-by: syzbot+77c53db50c9fff774e8e@syzkaller.appspotmail.com
Fix commit: 49ec114a6e62 smackfs: restrict bytes count in smk_set_cipso()
First crash: 665d, last: 587d

Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: WARNING in smk_set_cipso (log)
Repro: C syz .config
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING in smk_set_cipso C inconclusive 19 668d 749d 0/24 closed as dup on 2021/01/20 02:53

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 1 PID: 8372 at mm/page_alloc.c:4985 __alloc_pages_nodemask+0x44e/0x500 mm/page_alloc.c:5029
Modules linked in:
CPU: 1 PID: 8372 Comm: syz-executor118 Not tainted 5.12.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__alloc_pages_nodemask+0x44e/0x500 mm/page_alloc.c:5029
Code: 00 48 ba 00 00 00 00 00 fc ff df e9 fb fd ff ff 89 f9 80 e1 07 80 c1 03 38 c1 0f 8c 06 fe ff ff e8 97 67 09 00 e9 fc fd ff ff <0f> 0b e9 15 fe ff ff 44 89 ed a9 00 00 08 00 75 11 81 e5 7f ff ff
RSP: 0018:ffffc90001e2fba0 EFLAGS: 00010246
RAX: ffffc90001e2fba8 RBX: ffffc90001e2fbd4 RCX: 0000000000000000
RDX: 0000000000000028 RSI: 0000000000000000 RDI: ffffc90001e2fbd0
RBP: 0000000000000000 R08: dffffc0000000000 R09: ffffc90001e2fba8
R10: fffff520003c5f7a R11: 0000000000000000 R12: 0000000000f0ff80
R13: 0000000000040cc0 R14: 1ffff920003c5f7a R15: 000000000000000c
FS:  0000000001eb9300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020003314 CR3: 0000000012ba3000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 alloc_pages include/linux/gfp.h:561 [inline]
 kmalloc_order+0x41/0x170 mm/slab_common.c:902
 kmalloc_order_trace+0x15/0x70 mm/slab_common.c:918
 kmalloc_large include/linux/slab.h:483 [inline]
 __kmalloc_track_caller+0x26d/0x390 mm/slub.c:4554
 memdup_user_nul+0x26/0xf0 mm/util.c:260
 smk_set_cipso+0xff/0x6f0 security/smack/smackfs.c:859
 vfs_write+0x220/0xab0 fs/read_write.c:603
 ksys_write+0x11b/0x220 fs/read_write.c:658
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x43ee59
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:00007ffddac6bda8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 000000000043ee59
RDX: 0000000000f0ff7f RSI: 0000000000000000 RDI: 0000000000000003
RBP: 0000000000402e40 R08: 0000000000000000 R09: 0000000000400488
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402ed0
R13: 0000000000000000 R14: 00000000004ac018 R15: 0000000000400488

Crashes (24):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-kasan-gce-smack-root 2021/04/12 06:19 upstream 7d900724913c bfeda1b1 .config console log report syz C WARNING in smk_set_cipso
ci-upstream-kasan-gce-smack-root 2021/06/29 02:07 upstream 62fb9874f5da 9d2ab5df .config console log report info WARNING in smk_set_cipso
ci-upstream-kasan-gce-smack-root 2021/06/27 08:04 upstream 625acffd7ae2 9d2ab5df .config console log report info WARNING in smk_set_cipso
ci-upstream-kasan-gce-smack-root 2021/06/23 16:23 upstream 0c18f29aae7c aba2b2fb .config console log report info WARNING in smk_set_cipso
ci-upstream-kasan-gce-smack-root 2021/06/23 00:58 upstream 0c18f29aae7c aba2b2fb .config console log report info WARNING in smk_set_cipso
ci-upstream-kasan-gce-smack-root 2021/06/21 11:37 upstream cba5e97280f5 aba2b2fb .config console log report info WARNING in smk_set_cipso
ci-upstream-kasan-gce-smack-root 2021/06/20 14:01 upstream 913ec3c22ef4 aba2b2fb .config console log report info WARNING in smk_set_cipso
ci-upstream-kasan-gce-smack-root 2021/06/14 13:01 upstream 009c9aa5be65 1ba81399 .config console log report info WARNING in smk_set_cipso
ci-upstream-kasan-gce-smack-root 2021/06/09 09:04 upstream 4c8684fe555e 5c2fe346 .config console log report info WARNING in smk_set_cipso
ci-upstream-kasan-gce-smack-root 2021/06/06 20:21 upstream f5b6eb1e0182 500c2339 .config console log report info WARNING in smk_set_cipso
ci-upstream-kasan-gce-smack-root 2021/06/04 06:25 upstream f88cd3fb9df2 0740de69 .config console log report info WARNING in smk_set_cipso
ci-upstream-kasan-gce-smack-root 2021/06/01 02:48 upstream c2131f7e73c9 032639db .config console log report info WARNING in smk_set_cipso
ci-upstream-kasan-gce-smack-root 2021/06/01 02:48 upstream c2131f7e73c9 032639db .config console log report info WARNING in smk_set_cipso
ci-upstream-kasan-gce-smack-root 2021/05/23 17:59 upstream 4d7620341eda 3c7fef33 .config console log report info WARNING in smk_set_cipso
ci-upstream-kasan-gce-smack-root 2021/05/11 08:13 upstream 0aa099a312b6 ca873091 .config console log report info WARNING in smk_set_cipso
ci-upstream-kasan-gce-smack-root 2021/05/09 04:05 upstream ab159ac569fd bc5434be .config console log report info WARNING in smk_set_cipso
ci-upstream-kasan-gce-smack-root 2021/05/02 22:27 upstream d2b6f8a17919 77e2b668 .config console log report info WARNING in smk_set_cipso
ci-upstream-kasan-gce-smack-root 2021/05/01 16:09 upstream d2b6f8a17919 77e2b668 .config console log report info WARNING in smk_set_cipso
ci-upstream-kasan-gce-smack-root 2021/05/01 12:08 upstream d2b6f8a17919 77e2b668 .config console log report info WARNING in smk_set_cipso
ci-upstream-kasan-gce-smack-root 2021/04/24 11:41 upstream e77a830c8297 17f0b706 .config console log report info WARNING in smk_set_cipso
ci-upstream-kasan-gce-smack-root 2021/04/23 22:25 upstream 18a3c5f7abfd 17f0b706 .config console log report info WARNING in smk_set_cipso
ci-upstream-kasan-gce-smack-root 2021/04/22 13:16 upstream 16fc44d6387e 33c28d03 .config console log report info WARNING in smk_set_cipso
ci-upstream-kasan-gce-smack-root 2021/04/22 04:10 upstream 16fc44d6387e 2bc8999a .config console log report info WARNING in smk_set_cipso
ci-upstream-kasan-gce-smack-root 2021/04/12 06:06 upstream 7d900724913c bfeda1b1 .config console log report info WARNING in smk_set_cipso
* Struck through repros no longer work on HEAD.