[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. [ 11.505242] audit: type=1400 audit(1514638578.980:6): avc: denied { map } for pid=3134 comm="bash" path="/bin/bash" dev="sda1" ino=1457 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.31' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 32.821428] audit: type=1400 audit(1514638600.296:7): avc: denied { map } for pid=3153 comm="syzkaller620982" path="/root/syzkaller620982068" dev="sda1" ino=16481 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 [ 32.825886] ================================================================== [ 32.825901] BUG: KASAN: slab-out-of-bounds in cap_convert_nscap+0x501/0x610 [ 32.825906] Read of size 4 at addr ffff8801c8195940 by task syzkaller620982/3153 [ 32.825907] [ 32.825912] CPU: 0 PID: 3153 Comm: syzkaller620982 Not tainted 4.15.0-rc4-mm1+ #49 [ 32.825915] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.825916] Call Trace: [ 32.825925] dump_stack+0x194/0x257 [ 32.825933] ? arch_local_irq_restore+0x53/0x53 [ 32.825940] ? show_regs_print_info+0x18/0x18 [ 32.825949] ? lock_release+0xa40/0xa40 [ 32.825954] ? cap_convert_nscap+0x501/0x610 [ 32.825963] print_address_description+0x73/0x250 [ 32.825967] ? cap_convert_nscap+0x501/0x610 [ 32.825973] kasan_report+0x23b/0x360 [ 32.825983] __asan_report_load4_noabort+0x14/0x20 [ 32.825987] cap_convert_nscap+0x501/0x610 [ 32.825993] ? kasan_check_write+0x14/0x20 [ 32.826007] setxattr+0x365/0x400 [ 32.826011] ? setxattr+0x365/0x400 [ 32.826019] ? vfs_setxattr+0xe0/0xe0 [ 32.826025] ? lock_acquire+0x1d5/0x580 [ 32.826028] ? lock_acquire+0x1d5/0x580 [ 32.826033] ? mnt_want_write_file_path+0x68/0x110 [ 32.826047] ? __lock_is_held+0xb6/0x140 [ 32.826052] ? __mnt_want_write+0x25c/0x370 [ 32.826060] ? do_umount+0xda0/0xda0 [ 32.826068] ? rcu_read_lock_sched_held+0x108/0x120 [ 32.826073] ? rcu_sync_lockdep_assert+0x6d/0xb0 [ 32.826081] ? __mnt_want_write_file+0x97/0xb0 [ 32.826091] SyS_fsetxattr+0x130/0x190 [ 32.826103] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 32.826107] RIP: 0033:0x43fcf9 [ 32.826109] RSP: 002b:00007ffe0f3de128 EFLAGS: 00000203 ORIG_RAX: 00000000000000be [ 32.826114] RAX: ffffffffffffffda RBX: 6f72746e6f632f2e RCX: 000000000043fcf9 [ 32.826117] RDX: 00000000208c4fe9 RSI: 0000000020f4c000 RDI: 0000000000000003 [ 32.826119] RBP: 00000000006ca018 R08: 0000000000000001 R09: 0000000000000000 [ 32.826121] R10: 0000000000000001 R11: 0000000000000203 R12: 0000000000401660 [ 32.826124] R13: 00000000004016f0 R14: 0000000000000000 R15: 0000000000000000 [ 32.826140] [ 32.826143] Allocated by task 3153: [ 32.826147] save_stack+0x43/0xd0 [ 32.826150] kasan_kmalloc+0xad/0xe0 [ 32.826154] __kmalloc_node+0x47/0x70 [ 32.826160] kvmalloc_node+0x99/0xd0 [ 32.826164] setxattr+0x152/0x400 [ 32.826167] SyS_fsetxattr+0x130/0x190 [ 32.826171] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 32.826172] [ 32.826174] Freed by task 1652: [ 32.826177] save_stack+0x43/0xd0 [ 32.826180] kasan_slab_free+0x71/0xc0 [ 32.826183] kfree+0xd6/0x260 [ 32.826189] security_context_to_sid_core+0x182/0x5a0 [ 32.826192] security_context_to_sid+0x32/0x40 [ 32.826196] sel_write_context+0x18b/0x340 [ 32.826199] selinux_transaction_write+0xd1/0x130 [ 32.826204] __vfs_write+0xef/0x970 [ 32.826207] vfs_write+0x189/0x510 [ 32.826210] SyS_write+0xef/0x220 [ 32.826213] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 32.826214] [ 32.826217] The buggy address belongs to the object at ffff8801c8195940 [ 32.826217] which belongs to the cache kmalloc-32 of size 32 [ 32.826221] The buggy address is located 0 bytes inside of [ 32.826221] 32-byte region [ffff8801c8195940, ffff8801c8195960) [ 32.826222] The buggy address belongs to the page: [ 32.826226] page:ffffea0007206540 count:1 mapcount:0 mapping:ffff8801c8195000 index:0xffff8801c8195fc1 [ 32.826230] flags: 0x2fffc0000000100(slab) [ 32.826236] raw: 02fffc0000000100 ffff8801c8195000 ffff8801c8195fc1 000000010000003f [ 32.826241] raw: ffffea000727e9e0 ffffea00072068e0 ffff8801dac001c0 0000000000000000 [ 32.826243] page dumped because: kasan: bad access detected [ 32.826244] [ 32.826246] Memory state around the buggy address: [ 32.826250] ffff8801c8195800: 00 00 00 fc fc fc fc fc 00 00 01 fc fc fc fc fc [ 32.826253] ffff8801c8195880: fb fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 32.826256] >ffff8801c8195900: fb fb fb fb fc fc fc fc 01 fc fc fc fc fc fc fc [ 32.826258] ^ [ 32.826261] ffff8801c8195980: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 32.826264] ffff8801c8195a00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 32.826265] ================================================================== [ 32.826267] Disabling lock debugging due to kernel taint [ 32.826280] Kernel panic - not syncing: panic_on_warn set ... [ 32.826280] [ 32.826284] CPU: 0 PID: 3153 Comm: syzkaller620982 Tainted: G B 4.15.0-rc4-mm1+ #49 [ 32.826286] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.826287] Call Trace: [ 32.826291] dump_stack+0x194/0x257 [ 32.826296] ? arch_local_irq_restore+0x53/0x53 [ 32.826302] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 32.826307] ? vsnprintf+0x1ed/0x1900 [ 32.826311] ? cap_convert_nscap+0x450/0x610 [ 32.826317] panic+0x1e4/0x41c [ 32.826322] ? refcount_error_report+0x214/0x214 [ 32.826327] ? add_taint+0x1c/0x50 [ 32.826331] ? add_taint+0x1c/0x50 [ 32.826336] ? cap_convert_nscap+0x501/0x610 [ 32.826340] kasan_end_report+0x50/0x50 [ 32.826344] kasan_report+0x148/0x360 [ 32.826351] __asan_report_load4_noabort+0x14/0x20 [ 32.826354] cap_convert_nscap+0x501/0x610 [ 32.826358] ? kasan_check_write+0x14/0x20 [ 32.826365] setxattr+0x365/0x400 [ 32.826368] ? setxattr+0x365/0x400 [ 32.826374] ? vfs_setxattr+0xe0/0xe0 [ 32.826378] ? lock_acquire+0x1d5/0x580 [ 32.826381] ? lock_acquire+0x1d5/0x580 [ 32.826385] ? mnt_want_write_file_path+0x68/0x110 [ 32.826393] ? __lock_is_held+0xb6/0x140 [ 32.826397] ? __mnt_want_write+0x25c/0x370 [ 32.826402] ? do_umount+0xda0/0xda0 [ 32.826408] ? rcu_read_lock_sched_held+0x108/0x120 [ 32.826411] ? rcu_sync_lockdep_assert+0x6d/0xb0 [ 32.826417] ? __mnt_want_write_file+0x97/0xb0 [ 32.826424] SyS_fsetxattr+0x130/0x190 [ 32.826430] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 32.826433] RIP: 0033:0x43fcf9 [ 32.826435] RSP: 002b:00007ffe0f3de128 EFLAGS: 00000203 ORIG_RAX: 00000000000000be [ 32.826438] RAX: ffffffffffffffda RBX: 6f72746e6f632f2e RCX: 000000000043fcf9 [ 32.826440] RDX: 00000000208c4fe9 RSI: 0000000020f4c000 RDI: 0000000000000003 [ 32.826442] RBP: 00000000006ca018 R08: 0000000000000001 R09: 0000000000000000 [ 32.826445] R10: 0000000000000001 R11: 0000000000000203 R12: 0000000000401660 [ 32.826447] R13: 00000000004016f0 R14: 0000000000000000 R15: 0000000000000000 [ 32.847663] Dumping ftrace buffer: [ 32.847666] (ftrace buffer empty) [ 32.847669] Kernel Offset: disabled [ 33.457735] Rebooting in 86400 seconds..