================================================================== BUG: KASAN: slab-out-of-bounds in record_print_text+0x33f/0x380 kernel/printk/printk.c:1401 Write of size 1 at addr ffff8880251ef417 by task in:imklog/8138 CPU: 0 PID: 8138 Comm: in:imklog Not tainted 5.11.0-rc4-next-20210121-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:230 __kasan_report mm/kasan/report.c:397 [inline] kasan_report.cold+0x79/0xd5 mm/kasan/report.c:414 record_print_text+0x33f/0x380 kernel/printk/printk.c:1401 syslog_print+0x2bb/0x430 kernel/printk/printk.c:1459 do_syslog.part.0+0x2a8/0x7c0 kernel/printk/printk.c:1586 do_syslog+0x49/0x60 kernel/printk/printk.c:1567 kmsg_read+0x90/0xb0 fs/proc/kmsg.c:40 pde_read fs/proc/inode.c:321 [inline] proc_reg_read+0x119/0x300 fs/proc/inode.c:331 vfs_read+0x1b5/0x570 fs/read_write.c:494 ksys_read+0x12d/0x250 fs/read_write.c:634 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7fa527c5b22d Code: c1 20 00 00 75 10 b8 00 00 00 00 0f 05 48 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 4e fc ff ff 48 89 04 24 b8 00 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 97 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01 RSP: 002b:00007fa5255f7580 EFLAGS: 00000293 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fa527c5b22d RDX: 0000000000001fa0 RSI: 00007fa5255f7da0 RDI: 0000000000000004 RBP: 00005627aaade9d0 R08: 0000000000000000 R09: 0000000000000000 R10: 2ce33e6c02ce33e7 R11: 0000000000000293 R12: 00007fa5255f7da0 R13: 0000000000001fa0 R14: 0000000000001f9f R15: 00007fa5255f7e25 Allocated by task 8138: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:403 [inline] ____kasan_kmalloc mm/kasan/common.c:434 [inline] ____kasan_kmalloc.constprop.0+0xa0/0xd0 mm/kasan/common.c:406 kmalloc include/linux/slab.h:556 [inline] syslog_print+0xb2/0x430 kernel/printk/printk.c:1430 do_syslog.part.0+0x2a8/0x7c0 kernel/printk/printk.c:1586 do_syslog+0x49/0x60 kernel/printk/printk.c:1567 kmsg_read+0x90/0xb0 fs/proc/kmsg.c:40 pde_read fs/proc/inode.c:321 [inline] proc_reg_read+0x119/0x300 fs/proc/inode.c:331 vfs_read+0x1b5/0x570 fs/read_write.c:494 ksys_read+0x12d/0x250 fs/read_write.c:634 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xe5/0x110 mm/kasan/generic.c:345 kvfree_call_rcu+0x104/0x7c0 kernel/rcu/tree.c:3549 put_css_set_locked+0xa33/0xff0 kernel/cgroup/cgroup.c:957 cgroup_migrate_finish+0x380/0x650 kernel/cgroup/cgroup.c:2546 cgroup_attach_task+0x42c/0x790 kernel/cgroup/cgroup.c:2738 cgroup_attach_task_all+0xb6/0x140 kernel/cgroup/cgroup-v1.c:71 kvm_vm_worker_thread+0xdd/0x270 arch/x86/kvm/../../../virt/kvm/kvm_main.c:5037 kthread+0x3b1/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296 Second to last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xe5/0x110 mm/kasan/generic.c:345 kvfree_call_rcu+0x104/0x7c0 kernel/rcu/tree.c:3549 neigh_destroy+0x3ff/0x5f0 net/core/neighbour.c:858 neigh_release include/net/neighbour.h:425 [inline] neigh_cleanup_and_release+0x1fd/0x340 net/core/neighbour.c:103 neigh_periodic_work+0x637/0x9e0 net/core/neighbour.c:940 process_one_work+0x98d/0x15f0 kernel/workqueue.c:2275 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421 kthread+0x3b1/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296 The buggy address belongs to the object at ffff8880251ef000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 23 bytes to the right of 1024-byte region [ffff8880251ef000, ffff8880251ef400) The buggy address belongs to the page: page:00000000617caf5a refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x251ec head:00000000617caf5a order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888010041dc0 raw: 0000000000000000 0000000080080008 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880251ef300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880251ef380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880251ef400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880251ef480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880251ef500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================