================================================================== BUG: KASAN: slab-out-of-bounds in decode_data.part.1+0x23c/0x280 drivers/net/hamradio/6pack.c:843 Write of size 1 at addr ffff88809622f04e by task kworker/u4:6/434 CPU: 0 PID: 434 Comm: kworker/u4:6 Not tainted 5.5.0-rc7-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events_unbound flush_to_ldisc Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x12d/0x187 lib/dump_stack.c:118 print_address_description.constprop.8.cold.10+0x9/0x31d mm/kasan/report.c:374 __kasan_report.cold.11+0x1b/0x3a mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:639 __asan_report_store1_noabort+0x17/0x20 mm/kasan/generic_report.c:137 decode_data.part.1+0x23c/0x280 drivers/net/hamradio/6pack.c:843 decode_data drivers/net/hamradio/6pack.c:965 [inline] sixpack_decode drivers/net/hamradio/6pack.c:968 [inline] sixpack_receive_buf+0x7a8/0x12c0 drivers/net/hamradio/6pack.c:458 tty_ldisc_receive_buf+0xff/0x1b0 drivers/tty/tty_buffer.c:465 tty_port_default_receive_buf+0x5f/0x90 drivers/tty/tty_port.c:38 receive_buf drivers/tty/tty_buffer.c:481 [inline] flush_to_ldisc+0x1aa/0x3a0 drivers/tty/tty_buffer.c:533 process_one_work+0x856/0x1630 kernel/workqueue.c:2264 worker_thread+0x85/0xb60 kernel/workqueue.c:2410 kthread+0x331/0x3f0 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Allocated by task 8294: save_stack+0x21/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc.constprop.17+0xc7/0xd0 mm/kasan/common.c:513 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:527 __do_kmalloc_node mm/slab.c:3616 [inline] __kmalloc_node+0x4d/0x70 mm/slab.c:3623 kmalloc_node include/linux/slab.h:579 [inline] kvmalloc_node+0x6a/0x80 mm/util.c:574 kvmalloc include/linux/mm.h:655 [inline] kvzalloc include/linux/mm.h:663 [inline] alloc_netdev_mqs+0x5d/0xca0 net/core/dev.c:9732 sixpack_open+0xe0/0x9fb drivers/net/hamradio/6pack.c:563 tty_ldisc_open.isra.3+0x78/0xc0 drivers/tty/tty_ldisc.c:464 tty_set_ldisc+0x238/0x5b0 drivers/tty/tty_ldisc.c:591 tiocsetd drivers/tty/tty_io.c:2337 [inline] tty_ioctl+0x332/0x12f0 drivers/tty/tty_io.c:2597 vfs_ioctl fs/ioctl.c:47 [inline] file_ioctl fs/ioctl.c:545 [inline] do_vfs_ioctl+0x196/0x1190 fs/ioctl.c:732 ksys_ioctl+0x62/0x90 fs/ioctl.c:749 __do_sys_ioctl fs/ioctl.c:756 [inline] __se_sys_ioctl fs/ioctl.c:754 [inline] __x64_sys_ioctl+0x6e/0xb0 fs/ioctl.c:754 do_syscall_64+0xca/0x5f0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 7990: save_stack+0x21/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:335 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:474 kasan_slab_free+0xe/0x10 mm/kasan/common.c:483 __cache_free mm/slab.c:3426 [inline] kfree+0x108/0x2c0 mm/slab.c:3757 tomoyo_realpath_from_path+0x154/0x620 security/tomoyo/realpath.c:289 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x203/0x380 security/tomoyo/file.c:822 tomoyo_inode_getattr+0x13/0x20 security/tomoyo/tomoyo.c:129 security_inode_getattr+0xb0/0x100 security/security.c:1222 vfs_getattr+0x1c/0x40 fs/stat.c:115 vfs_statx+0xd8/0x150 fs/stat.c:191 vfs_stat include/linux/fs.h:3249 [inline] __do_sys_newstat+0x85/0xe0 fs/stat.c:341 __se_sys_newstat fs/stat.c:337 [inline] __x64_sys_newstat+0x4f/0x70 fs/stat.c:337 do_syscall_64+0xca/0x5f0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88809622e000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 78 bytes to the right of 4096-byte region [ffff88809622e000, ffff88809622f000) The buggy address belongs to the page: page:ffffea0002588b80 refcount:1 mapcount:0 mapping:ffff8880aa402000 index:0x0 compound_mapcount: 0 raw: 00fffe0000010200 ffffea00025fd588 ffffea00024eaa08 ffff8880aa402000 raw: 0000000000000000 ffff88809622e000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809622ef00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88809622ef80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88809622f000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88809622f080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88809622f100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================