netlink: 'syz-executor.0': attribute type 1 has an invalid length. netlink: 8 bytes leftover after parsing attributes in process `syz-executor.0'. ================================================================== BUG: KASAN: use-after-free in relay_switch_subbuf+0x8be/0x920 kernel/relay.c:755 Read of size 8 at addr ffff8880978c21f8 by task syz-executor.5/10264 CPU: 1 PID: 10264 Comm: syz-executor.5 Not tainted 4.19.82 #0 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+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold+0x8c/0x2ba mm/kasan/report.c:396 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 relay_switch_subbuf+0x8be/0x920 kernel/relay.c:755 relay_flush kernel/relay.c:883 [inline] relay_flush+0x1c4/0x280 kernel/relay.c:867 __blk_trace_startstop.isra.0+0x216/0x630 kernel/trace/blktrace.c:668 blk_trace_ioctl+0x1c6/0x300 kernel/trace/blktrace.c:727 blkdev_ioctl+0x126/0x1ab6 block/ioctl.c:587 block_ioctl+0xee/0x130 fs/block_dev.c:1891 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xd5f/0x1380 fs/ioctl.c:688 ksys_ioctl+0xab/0xd0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:710 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45a219 Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f283d3b5c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045a219 RDX: 0000000020000080 RSI: 0000000000001275 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f283d3b66d4 R13: 00000000004c1bbc R14: 00000000004d5968 R15: 00000000ffffffff Allocated by task 8550: save_stack+0x45/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc mm/kasan/kasan.c:553 [inline] kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:531 kasan_slab_alloc+0xf/0x20 mm/kasan/kasan.c:490 kmem_cache_alloc+0x12e/0x700 mm/slab.c:3559 __d_alloc+0x2e/0x9c0 fs/dcache.c:1610 d_alloc+0x4d/0x280 fs/dcache.c:1694 d_alloc_parallel+0xf4/0x1bb0 fs/dcache.c:2441 __lookup_slow+0x1ab/0x500 fs/namei.c:1654 lookup_one_len+0x16d/0x1a0 fs/namei.c:2543 start_creating fs/debugfs/inode.c:313 [inline] start_creating+0xbf/0x1e0 fs/debugfs/inode.c:289 __debugfs_create_file+0x65/0x400 fs/debugfs/inode.c:352 debugfs_create_file+0x5a/0x70 fs/debugfs/inode.c:404 blk_create_buf_file_callback+0x33/0x40 kernel/trace/blktrace.c:444 relay_create_buf_file+0xf9/0x180 kernel/relay.c:428 relay_open_buf.part.0+0x76e/0xb60 kernel/relay.c:457 relay_open_buf kernel/relay.c:449 [inline] relay_open kernel/relay.c:599 [inline] relay_open+0x523/0x980 kernel/relay.c:563 do_blk_trace_setup+0x414/0xb90 kernel/trace/blktrace.c:532 __blk_trace_setup+0xe3/0x190 kernel/trace/blktrace.c:577 blk_trace_ioctl+0x170/0x300 kernel/trace/blktrace.c:716 blkdev_ioctl+0x126/0x1ab6 block/ioctl.c:587 block_ioctl+0xee/0x130 fs/block_dev.c:1891 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xd5f/0x1380 fs/ioctl.c:688 ksys_ioctl+0xab/0xd0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:710 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 9489: save_stack+0x45/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3503 [inline] kmem_cache_free+0x86/0x260 mm/slab.c:3765 __d_free+0x20/0x30 fs/dcache.c:257 __rcu_reclaim kernel/rcu/rcu.h:236 [inline] rcu_do_batch kernel/rcu/tree.c:2584 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2897 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2864 [inline] rcu_process_callbacks+0xba0/0x1a30 kernel/rcu/tree.c:2881 __do_softirq+0x25c/0x921 kernel/softirq.c:292 The buggy address belongs to the object at ffff8880978c21a0 which belongs to the cache dentry(87:syz4) of size 288 The buggy address is located 88 bytes inside of 288-byte region [ffff8880978c21a0, ffff8880978c22c0) The buggy address belongs to the page: page:ffffea00025e3080 count:1 mapcount:0 mapping:ffff8880a955dc00 index:0x0 flags: 0x1fffc0000000100(slab) raw: 01fffc0000000100 ffffea00023a9208 ffffea0002527308 ffff8880a955dc00 raw: 0000000000000000 ffff8880978c2040 000000010000000b ffff888054b8ed40 page dumped because: kasan: bad access detected page->mem_cgroup:ffff888054b8ed40 netlink: 'syz-executor.0': attribute type 1 has an invalid length. Memory state around the buggy address: ffff8880978c2080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880978c2100: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc >ffff8880978c2180: fc fc fc fc fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880978c2200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880978c2280: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc audit: type=1400 audit(1573284505.443:626): avc: denied { getattr } for pid=10173 comm="syz-executor.0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 ================================================================== net_ratelimit: 16 callbacks suppressed protocol 88fb is buggy, dev hsr_slave_0 protocol 88fb is buggy, dev hsr_slave_1 protocol 88fb is buggy, dev hsr_slave_0 netlink: 8 bytes leftover after parsing attributes in process `syz-executor.0'. protocol 88fb is buggy, dev hsr_slave_1 protocol 88fb is buggy, dev hsr_slave_0 protocol 88fb is buggy, dev hsr_slave_1 protocol 88fb is buggy, dev hsr_slave_0 protocol 88fb is buggy, dev hsr_slave_1 protocol 88fb is buggy, dev hsr_slave_0 protocol 88fb is buggy, dev hsr_slave_1