[....] Starting enhanced syslogd: rsyslogd[ 13.433274] audit: type=1400 audit(1513378466.437:5): avc: denied { syslog } for pid=2995 comm="rsyslogd" capability=34 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=capability2 permissive=1 [?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 18.007497] audit: type=1400 audit(1513378471.011:6): avc: denied { map } for pid=3133 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 Warning: Permanently added 'ci-upstream-kasan-gce-386-2,10.128.0.56' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 61.335110] audit: type=1400 audit(1513378514.338:7): avc: denied { map } for pid=3150 comm="syzkaller110233" path="/root/syzkaller110233791" 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 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 68.181371] ================================================================== [ 68.188806] BUG: KASAN: use-after-free in crypto_aead_free_instance+0xc0/0xd0 [ 68.196060] Read of size 8 at addr ffff8801c32cf240 by task cryptomgr_test/6646 [ 68.203478] [ 68.205085] CPU: 1 PID: 6646 Comm: cryptomgr_test Not tainted 4.15.0-rc3+ #132 [ 68.212417] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 68.221748] Call Trace: [ 68.224315] dump_stack+0x194/0x257 [ 68.227920] ? arch_local_irq_restore+0x53/0x53 [ 68.232564] ? show_regs_print_info+0x18/0x18 [ 68.237048] ? crypto_aead_free_instance+0xc0/0xd0 [ 68.241954] print_address_description+0x73/0x250 [ 68.246781] ? crypto_aead_free_instance+0xc0/0xd0 [ 68.251685] kasan_report+0x25b/0x340 [ 68.255464] __asan_report_load8_noabort+0x14/0x20 [ 68.260368] crypto_aead_free_instance+0xc0/0xd0 [ 68.265104] ? aead_register_instance+0x1c0/0x1c0 [ 68.269922] crypto_free_instance+0x6d/0x100 [ 68.274307] crypto_destroy_instance+0x3c/0x80 [ 68.278863] ? crypto_free_instance+0x100/0x100 [ 68.283506] crypto_remove_final+0x212/0x370 [ 68.287889] ? do_wait_intr_irq+0x3e0/0x3e0 [ 68.292188] ? crypto_attr_alg2+0x140/0x140 [ 68.296491] ? up_write+0x6b/0x120 [ 68.300005] ? up_read+0x40/0x40 [ 68.303353] ? trace_hardirqs_on+0xd/0x10 [ 68.307486] crypto_alg_tested+0x445/0x6f0 [ 68.311704] ? crypto_unregister_template+0x6e0/0x6e0 [ 68.316878] ? _raw_spin_unlock_irqrestore+0x31/0xba [ 68.321960] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 68.326958] ? trace_hardirqs_on+0xd/0x10 [ 68.331087] cryptomgr_test+0x17/0x30 [ 68.334862] kthread+0x37a/0x440 [ 68.338203] ? crypto_acomp_scomp_free_ctx+0x100/0x100 [ 68.343453] ? kthread_stop+0x7b0/0x7b0 [ 68.347405] ret_from_fork+0x24/0x30 [ 68.351109] [ 68.352714] Allocated by task 6641: [ 68.356325] save_stack+0x43/0xd0 [ 68.359749] kasan_kmalloc+0xad/0xe0 [ 68.363438] kmem_cache_alloc_trace+0x136/0x750 [ 68.368080] pcrypt_create+0x137/0x6c0 [ 68.371946] cryptomgr_probe+0x74/0x240 [ 68.375891] kthread+0x37a/0x440 [ 68.379232] ret_from_fork+0x24/0x30 [ 68.382916] [ 68.384515] Freed by task 3335: [ 68.387770] save_stack+0x43/0xd0 [ 68.391194] kasan_slab_free+0x71/0xc0 [ 68.395054] kfree+0xca/0x250 [ 68.398134] crypto_larval_destroy+0x110/0x150 [ 68.402690] crypto_larval_kill+0x1e8/0x2e0 [ 68.406984] crypto_alg_mod_lookup+0x178/0x1b0 [ 68.411540] crypto_alloc_tfm+0xf3/0x2f0 [ 68.415575] crypto_alloc_aead+0x2c/0x40 [ 68.419610] aead_bind+0x70/0x140 [ 68.423039] alg_bind+0x1ab/0x440 [ 68.426473] SYSC_bind+0x1b4/0x3f0 [ 68.429987] SyS_bind+0x24/0x30 [ 68.433241] do_fast_syscall_32+0x3ee/0xf9d [ 68.437537] entry_SYSENTER_compat+0x51/0x60 [ 68.441914] [ 68.443517] The buggy address belongs to the object at ffff8801c32cf240 [ 68.443517] which belongs to the cache kmalloc-1024 of size 1024 [ 68.456327] The buggy address is located 0 bytes inside of [ 68.456327] 1024-byte region [ffff8801c32cf240, ffff8801c32cf640) [ 68.468088] The buggy address belongs to the page: [ 68.472992] page:000000004ffd125b count:1 mapcount:0 mapping:000000007c8f03ee index:0x0 compound_mapcount: 0 [ 68.482949] flags: 0x2fffc0000008100(slab|head) [ 68.487594] raw: 02fffc0000008100 ffff8801c32ce040 0000000000000000 0000000100000007 [ 68.495451] raw: ffffea00070b6ca0 ffffea00070b9120 ffff8801db000ac0 0000000000000000 [ 68.503303] page dumped because: kasan: bad access detected [ 68.508982] [ 68.510584] Memory state around the buggy address: [ 68.515493] ffff8801c32cf100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 68.522840] ffff8801c32cf180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb executing program [ 68.530177] >ffff8801c32cf200: fb fb fb fb fb fb fb fb fb fb fb fb 00 00 00 00 [ 68.537511] ^ [ 68.542935] ffff8801c32cf280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 68.550268] ffff8801c32cf300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 68.557604] ================================================================== [ 68.564931] Disabling lock debugging due to kernel taint [ 68.570466] Kernel panic - not syncing: panic_on_warn set ... [ 68.570466] executing program executing program executing program executing program executing program executing program executing program executing program [ 68.577819] CPU: 1 PID: 6646 Comm: cryptomgr_test Tainted: G B 4.15.0-rc3+ #132 [ 68.586468] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 68.595803] Call Trace: [ 68.598377] dump_stack+0x194/0x257 [ 68.601995] ? arch_local_irq_restore+0x53/0x53 [ 68.606653] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 68.611401] ? vsnprintf+0x1ed/0x1900 [ 68.615193] ? crypto_aead_free_instance+0x40/0xd0 [ 68.620110] panic+0x1e4/0x41c [ 68.623288] ? refcount_error_report+0x214/0x214 [ 68.628030] ? add_taint+0x1c/0x50 executing program executing program executing program [ 68.631555] ? add_taint+0x1c/0x50 [ 68.635080] ? crypto_aead_free_instance+0xc0/0xd0 [ 68.639994] kasan_end_report+0x50/0x50 [ 68.643953] kasan_report+0x144/0x340 [ 68.647747] __asan_report_load8_noabort+0x14/0x20 [ 68.652664] crypto_aead_free_instance+0xc0/0xd0 [ 68.653208] ================================================================== [ 68.653219] BUG: KASAN: double-free or invalid-free in crypto_larval_destroy+0x110/0x150 [ 68.653220] [ 68.674516] ? aead_register_instance+0x1c0/0x1c0 [ 68.679330] crypto_free_instance+0x6d/0x100 [ 68.683709] crypto_destroy_instance+0x3c/0x80 [ 68.688262] ? crypto_free_instance+0x100/0x100 [ 68.692898] crypto_remove_final+0x212/0x370 [ 68.697276] ? do_wait_intr_irq+0x3e0/0x3e0 [ 68.701569] ? crypto_attr_alg2+0x140/0x140 [ 68.705861] ? up_write+0x6b/0x120 [ 68.709372] ? up_read+0x40/0x40 [ 68.712711] ? trace_hardirqs_on+0xd/0x10 [ 68.716849] crypto_alg_tested+0x445/0x6f0 [ 68.721058] ? crypto_unregister_template+0x6e0/0x6e0 [ 68.726220] ? _raw_spin_unlock_irqrestore+0x31/0xba [ 68.731294] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 68.736279] ? trace_hardirqs_on+0xd/0x10 [ 68.740402] cryptomgr_test+0x17/0x30 [ 68.744171] kthread+0x37a/0x440 [ 68.747507] ? crypto_acomp_scomp_free_ctx+0x100/0x100 [ 68.752754] ? kthread_stop+0x7b0/0x7b0 [ 68.756712] ret_from_fork+0x24/0x30 [ 68.760411] CPU: 0 PID: 6691 Comm: syzkaller110233 Tainted: G B 4.15.0-rc3+ #132 [ 68.769139] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 68.778457] Call Trace: [ 68.781013] dump_stack+0x194/0x257 [ 68.784612] ? arch_local_irq_restore+0x53/0x53 [ 68.789248] ? show_regs_print_info+0x18/0x18 [ 68.793805] ? crypto_larval_destroy+0x110/0x150 [ 68.798532] print_address_description+0x73/0x250 [ 68.803351] ? crypto_larval_destroy+0x110/0x150 [ 68.808075] ? crypto_larval_destroy+0x110/0x150 [ 68.812799] kasan_report_double_free+0x55/0x80 [ 68.817436] kasan_slab_free+0xa3/0xc0 [ 68.821293] kfree+0xca/0x250 [ 68.824374] ? crypto_alg_lookup+0x50/0x50 [ 68.828577] crypto_larval_destroy+0x110/0x150 [ 68.833130] ? crypto_alg_lookup+0x50/0x50 [ 68.837335] crypto_larval_kill+0x1e8/0x2e0 [ 68.841627] ? crypto_mod_put+0xa0/0xa0 [ 68.845574] ? crypto_larval_lookup+0x50/0x50 [ 68.850041] ? crypto_larval_lookup+0x50/0x50 [ 68.854504] crypto_alg_mod_lookup+0x178/0x1b0 [ 68.859057] crypto_alloc_tfm+0xf3/0x2f0 [ 68.863089] ? __down_interruptible+0x6b0/0x6b0 [ 68.867730] crypto_alloc_aead+0x2c/0x40 [ 68.871761] aead_bind+0x70/0x140 [ 68.875186] ? aead_recvmsg+0x1bc0/0x1bc0 [ 68.879300] alg_bind+0x1ab/0x440 [ 68.882727] SYSC_bind+0x1b4/0x3f0 [ 68.886250] ? move_addr_to_kernel.part.18+0x100/0x100 [ 68.891497] ? handle_mm_fault+0x410/0x8d0 [ 68.895699] ? down_read_trylock+0xdb/0x170 [ 68.899990] ? __do_page_fault+0x32d/0xc90 [ 68.904197] ? __handle_mm_fault+0x3e20/0x3e20 [ 68.908747] ? vmacache_find+0x5f/0x280 [ 68.912689] ? vmacache_update+0xfe/0x130 [ 68.916821] SyS_bind+0x24/0x30 [ 68.920068] ? SyS_socketpair+0x6f0/0x6f0 [ 68.924188] do_fast_syscall_32+0x3ee/0xf9d [ 68.928483] ? do_int80_syscall_32+0x9d0/0x9d0 [ 68.933032] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 68.937759] ? lockdep_sys_exit+0x47/0xf0 [ 68.941892] ? syscall_return_slowpath+0x2ad/0x550 [ 68.946790] ? lockdep_sys_exit+0x47/0xf0 [ 68.950908] ? prepare_exit_to_usermode+0x229/0x340 [ 68.955891] ? perf_trace_sys_enter+0xcb0/0xcb0 [ 68.960528] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 68.965350] entry_SYSENTER_compat+0x51/0x60 [ 68.969725] RIP: 0023:0xf7f52c79 [ 68.973058] RSP: 002b:00000000ff9a586c EFLAGS: 00000203 ORIG_RAX: 0000000000000169 [ 68.980742] RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000020269000 [ 68.987983] RDX: 0000000000000058 RSI: 0000000000000167 RDI: 0000000000000026 [ 68.995219] RBP: 0000000000000005 R08: 0000000000000000 R09: 0000000000000000 [ 69.002456] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 69.009694] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 69.016942] [ 69.018541] Allocated by task 6691: [ 69.022136] save_stack+0x43/0xd0 [ 69.025554] kasan_kmalloc+0xad/0xe0 [ 69.029234] kmem_cache_alloc_trace+0x136/0x750 [ 69.033871] crypto_larval_alloc+0x51/0x1e0 [ 69.038161] crypto_larval_lookup.part.8+0x194/0x400 [ 69.043236] crypto_alg_mod_lookup+0x77/0x1b0 [ 69.047699] crypto_alloc_tfm+0xf3/0x2f0 [ 69.051727] crypto_alloc_aead+0x2c/0x40 [ 69.055756] aead_bind+0x70/0x140 [ 69.059180] alg_bind+0x1ab/0x440 [ 69.062600] SYSC_bind+0x1b4/0x3f0 [ 69.066106] SyS_bind+0x24/0x30 [ 69.069352] do_fast_syscall_32+0x3ee/0xf9d [ 69.073641] entry_SYSENTER_compat+0x51/0x60 [ 69.078011] [ 69.079607] Freed by task 3387: [ 69.082857] save_stack+0x43/0xd0 [ 69.086276] kasan_slab_free+0x71/0xc0 [ 69.090132] kfree+0xca/0x250 [ 69.093209] crypto_larval_destroy+0x110/0x150 [ 69.097758] crypto_larval_kill+0x1e8/0x2e0 [ 69.102047] crypto_alg_mod_lookup+0x178/0x1b0 [ 69.106595] crypto_alloc_tfm+0xf3/0x2f0 [ 69.110624] crypto_alloc_aead+0x2c/0x40 [ 69.114654] aead_bind+0x70/0x140 [ 69.118073] alg_bind+0x1ab/0x440 [ 69.121495] SYSC_bind+0x1b4/0x3f0 [ 69.125005] SyS_bind+0x24/0x30 [ 69.128251] do_fast_syscall_32+0x3ee/0xf9d [ 69.132540] entry_SYSENTER_compat+0x51/0x60 [ 69.136910] [ 69.138508] The buggy address belongs to the object at ffff8801c27a9200 [ 69.138508] which belongs to the cache kmalloc-1024 of size 1024 [ 69.151305] The buggy address is located 0 bytes inside of [ 69.151305] 1024-byte region [ffff8801c27a9200, ffff8801c27a9600) [ 69.163058] The buggy address belongs to the page: [ 69.167954] page:0000000020682ead count:1 mapcount:0 mapping:000000000619c10d index:0x0 compound_mapcount: 0 [ 69.177890] flags: 0x2fffc0000008100(slab|head) [ 69.182531] raw: 02fffc0000008100 ffff8801c27a8000 0000000000000000 0000000100000007 [ 69.190378] raw: ffffea00070af120 ffffea00070a6120 ffff8801db000ac0 0000000000000000 [ 69.198224] page dumped because: kasan: bad access detected [ 69.203909] [ 69.205502] Memory state around the buggy address: [ 69.210396] ffff8801c27a9100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 69.217721] ffff8801c27a9180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 69.225045] >ffff8801c27a9200: fb fb fb fb 00 00 00 00 00 00 00 00 00 00 00 00 [ 69.232369] ^ [ 69.235703] ffff8801c27a9280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 69.243026] ffff8801c27a9300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 69.250350] ================================================================== [ 69.814359] Shutting down cpus with NMI [ 69.818376] Dumping ftrace buffer: [ 69.821884] (ftrace buffer empty) [ 69.825564] Kernel Offset: disabled [ 69.829158] Rebooting in 86400 seconds..