netlink: 'syz-executor5': attribute type 3 has an invalid length. ptrace attach of "/root/syz-executor4"[10995] was attempted by "/root/syz-executor4"[11006] netlink: 'syz-executor5': attribute type 6 has an invalid length. ================================================================== BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:191 [inline] BUG: KASAN: use-after-free in task_is_descendant.part.0+0x6a1/0x6f0 security/yama/yama_lsm.c:295 Read of size 8 at addr ffff88805a9a49a0 by task syz-executor4/11018 CPU: 1 PID: 11018 Comm: syz-executor4 Not tainted 5.0.0-rc2 #25 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1db/0x2d0 lib/dump_stack.c:113 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:187 kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:135 __read_once_size include/linux/compiler.h:191 [inline] task_is_descendant.part.0+0x6a1/0x6f0 security/yama/yama_lsm.c:295 task_is_descendant security/yama/yama_lsm.c:282 [inline] yama_ptrace_access_check security/yama/yama_lsm.c:371 [inline] yama_ptrace_access_check+0x40d/0x10e8 security/yama/yama_lsm.c:358 security_ptrace_access_check+0x71/0xb0 security/security.c:271 __ptrace_may_access+0x555/0x930 kernel/ptrace.c:331 ptrace_attach+0x200/0x660 kernel/ptrace.c:379 __do_compat_sys_ptrace kernel/ptrace.c:1274 [inline] __se_compat_sys_ptrace kernel/ptrace.c:1256 [inline] __ia32_compat_sys_ptrace+0x1d3/0x2b0 kernel/ptrace.c:1256 do_syscall_32_irqs_on arch/x86/entry/common.c:326 [inline] do_fast_syscall_32+0x333/0xf98 arch/x86/entry/common.c:397 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7f70869 Code: 85 d2 74 02 89 0a 5b 5d c3 8b 04 24 c3 8b 14 24 c3 8b 3c 24 c3 90 90 90 90 90 90 90 90 90 90 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:00000000f5f2a0cc EFLAGS: 00000296 ORIG_RAX: 000000000000001a RAX: ffffffffffffffda RBX: 0000000000000010 RCX: 0000000000000156 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 8006: save_stack+0x45/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] __kasan_kmalloc mm/kasan/common.c:496 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:469 kasan_kmalloc mm/kasan/common.c:504 [inline] kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:411 kmem_cache_alloc_node+0x144/0x710 mm/slab.c:3633 alloc_task_struct_node kernel/fork.c:158 [inline] dup_task_struct kernel/fork.c:845 [inline] copy_process+0x405b/0x8710 kernel/fork.c:1753 _do_fork+0x1a9/0x1170 kernel/fork.c:2227 __do_compat_sys_x86_clone arch/x86/ia32/sys_ia32.c:240 [inline] __se_compat_sys_x86_clone arch/x86/ia32/sys_ia32.c:236 [inline] __ia32_compat_sys_x86_clone+0xbc/0x140 arch/x86/ia32/sys_ia32.c:236 do_syscall_32_irqs_on arch/x86/entry/common.c:326 [inline] do_fast_syscall_32+0x333/0xf98 arch/x86/entry/common.c:397 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 Freed by task 16: save_stack+0x45/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:458 kasan_slab_free+0xe/0x10 mm/kasan/common.c:466 __cache_free mm/slab.c:3487 [inline] kmem_cache_free+0x86/0x260 mm/slab.c:3749 free_task_struct kernel/fork.c:163 [inline] free_task+0x170/0x1f0 kernel/fork.c:458 __put_task_struct+0x2e0/0x630 kernel/fork.c:731 put_task_struct include/linux/sched/task.h:98 [inline] delayed_put_task_struct+0x2fd/0x4d0 kernel/exit.c:181 __rcu_reclaim kernel/rcu/rcu.h:240 [inline] rcu_do_batch kernel/rcu/tree.c:2452 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2773 [inline] rcu_process_callbacks+0xc4a/0x1680 kernel/rcu/tree.c:2754 __do_softirq+0x30b/0xb11 kernel/softirq.c:292 The buggy address belongs to the object at ffff88805a9a44c0 which belongs to the cache task_struct(81:syz4) of size 6080 The buggy address is located 1248 bytes inside of 6080-byte region [ffff88805a9a44c0, ffff88805a9a5c80) The buggy address belongs to the page: page:ffffea00016a6900 count:1 mapcount:0 mapping:ffff888087f75e00 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea000171d488 ffffea00016abc88 ffff888087f75e00 raw: 0000000000000000 ffff88805a9a44c0 0000000100000001 ffff88805f47e480 page dumped because: kasan: bad access detected page->mem_cgroup:ffff88805f47e480 Memory state around the buggy address: ffff88805a9a4880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88805a9a4900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88805a9a4980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88805a9a4a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88805a9a4a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================