================================================================== BUG: KASAN: use-after-free in __fb_pad_aligned_buffer include/linux/fb.h:674 [inline] BUG: KASAN: use-after-free in bit_putcs_aligned drivers/video/fbdev/core/bitblit.c:96 [inline] BUG: KASAN: use-after-free in bit_putcs+0xd5d/0xf10 drivers/video/fbdev/core/bitblit.c:185 Read of size 1 at addr ffff888087835cc4 by task syz-executor.5/1167 CPU: 1 PID: 1167 Comm: syz-executor.5 Not tainted 4.19.94-syzkaller #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+0x197/0x210 lib/dump_stack.c:118 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_load1_noabort+0x14/0x20 mm/kasan/report.c:430 __fb_pad_aligned_buffer include/linux/fb.h:674 [inline] bit_putcs_aligned drivers/video/fbdev/core/bitblit.c:96 [inline] bit_putcs+0xd5d/0xf10 drivers/video/fbdev/core/bitblit.c:185 fbcon_putcs+0x42b/0x4f0 drivers/video/fbdev/core/fbcon.c:1320 con_flush drivers/tty/vt/vt.c:2522 [inline] do_con_write.part.0+0xfb1/0x1eb0 drivers/tty/vt/vt.c:2772 do_con_write drivers/tty/vt/vt.c:2541 [inline] con_write+0x46/0xd0 drivers/tty/vt/vt.c:3110 process_output_block drivers/tty/n_tty.c:593 [inline] n_tty_write+0x3f9/0x1140 drivers/tty/n_tty.c:2331 do_tty_write drivers/tty/tty_io.c:960 [inline] tty_write+0x458/0x7a0 drivers/tty/tty_io.c:1044 do_loop_readv_writev fs/read_write.c:704 [inline] do_loop_readv_writev fs/read_write.c:688 [inline] do_iter_write fs/read_write.c:962 [inline] do_iter_write+0x488/0x5f0 fs/read_write.c:941 vfs_writev+0x1b3/0x2f0 fs/read_write.c:1005 do_writev+0x15e/0x370 fs/read_write.c:1040 __do_sys_writev fs/read_write.c:1113 [inline] __se_sys_writev fs/read_write.c:1110 [inline] __x64_sys_writev+0x75/0xb0 fs/read_write.c:1110 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45af49 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:00007fbee62f3c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000014 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045af49 RDX: 0000000000000001 RSI: 00000000200000c0 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbee62f46d4 R13: 00000000004c9559 R14: 00000000004e87b0 R15: 00000000ffffffff Allocated by task 24530: 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 kmem_cache_alloc_trace+0x152/0x760 mm/slab.c:3625 kmalloc include/linux/slab.h:515 [inline] kzalloc include/linux/slab.h:709 [inline] rxrpc_alloc_peer+0x6e/0x2f0 net/rxrpc/peer_object.c:220 rxrpc_service_prealloc_one+0xcc2/0x1470 net/rxrpc/call_accept.c:71 rxrpc_service_prealloc+0xd5/0x1d0 net/rxrpc/call_accept.c:179 rxrpc_listen+0x26c/0x370 net/rxrpc/af_rxrpc.c:236 __sys_listen+0x196/0x260 net/socket.c:1516 __do_sys_listen net/socket.c:1525 [inline] __se_sys_listen net/socket.c:1523 [inline] __x64_sys_listen+0x54/0x80 net/socket.c:1523 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 24527: 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] kfree+0xcf/0x220 mm/slab.c:3822 rxrpc_discard_prealloc+0x2f9/0xef0 net/rxrpc/call_accept.c:209 rxrpc_release_sock net/rxrpc/af_rxrpc.c:904 [inline] rxrpc_release+0x3f5/0x830 net/rxrpc/af_rxrpc.c:937 __sock_release+0xce/0x2a0 net/socket.c:579 sock_close+0x1b/0x30 net/socket.c:1140 __fput+0x2dd/0x8b0 fs/file_table.c:278 ____fput+0x16/0x20 fs/file_table.c:309 task_work_run+0x145/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x273/0x2c0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x53d/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff888087835b40 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 388 bytes inside of 1024-byte region [ffff888087835b40, ffff888087835f40) The buggy address belongs to the page: page:ffffea00021e0d00 count:1 mapcount:0 mapping:ffff88812c31cac0 index:0xffff8880878344c0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffffea0002009a88 ffffea0001379d88 ffff88812c31cac0 raw: ffff8880878344c0 ffff888087834040 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888087835b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888087835c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888087835c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888087835d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888087835d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== kobject: 'rx-0' (0000000020b3da09): kobject_cleanup, parent 00000000a6773c6d kobject: 'rx-0' (0000000020b3da09): auto cleanup 'remove' event kobject: 'rx-0' (0000000020b3da09): kobject_uevent_env kobject: 'rx-0' (0000000020b3da09): fill_kobj_path: path = '/devices/virtual/net/tun0/queues/rx-0' kobject: 'rx-0' (0000000020b3da09): auto cleanup kobject_del kobject: 'rx-0' (0000000020b3da09): calling ktype release kobject: 'rx-0': free name kobject: 'tx-0' (000000005342a319): kobject_cleanup, parent 00000000a6773c6d kobject: 'tx-0' (000000005342a319): auto cleanup 'remove' event kobject: 'tx-0' (000000005342a319): kobject_uevent_env kobject: 'tx-0' (000000005342a319): fill_kobj_path: path = '/devices/virtual/net/tun0/queues/tx-0' kobject: 'tx-0' (000000005342a319): auto cleanup kobject_del kobject: 'tx-0' (000000005342a319): calling ktype release kobject: 'tx-0': free name kobject: 'queues' (00000000a6773c6d): kobject_cleanup, parent (null) kobject: 'queues' (00000000a6773c6d): calling ktype release kobject: 'queues' (00000000a6773c6d): kset_release kobject: 'queues': free name kobject: 'tun0' (00000000a6839035): kobject_uevent_env kobject: 'tun0' (00000000a6839035): fill_kobj_path: path = '/devices/virtual/net/tun0'