================================================================== BUG: KASAN: slab-out-of-bounds in decode_data.part.0+0x23b/0x270 drivers/net/hamradio/6pack.c:838 Write of size 1 at addr ffff88810c1394ce by task kworker/u4:0/7 CPU: 0 PID: 7 Comm: kworker/u4:0 Not tainted 5.12.0-rc8-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:79 [inline] dump_stack+0x196/0x1f9 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5f/0x2d0 mm/kasan/report.c:232 __kasan_report mm/kasan/report.c:399 [inline] kasan_report.cold+0x7b/0xd4 mm/kasan/report.c:416 __asan_report_store1_noabort+0x17/0x20 mm/kasan/report_generic.c:311 decode_data.part.0+0x23b/0x270 drivers/net/hamradio/6pack.c:838 decode_data drivers/net/hamradio/6pack.c:960 [inline] sixpack_decode drivers/net/hamradio/6pack.c:963 [inline] sixpack_receive_buf drivers/net/hamradio/6pack.c:453 [inline] sixpack_receive_buf+0xcfe/0x1200 drivers/net/hamradio/6pack.c:430 tty_ldisc_receive_buf+0x15f/0x1c0 drivers/tty/tty_buffer.c:465 tty_port_default_receive_buf+0x73/0xa0 drivers/tty/tty_port.c:38 receive_buf drivers/tty/tty_buffer.c:481 [inline] flush_to_ldisc+0x210/0x380 drivers/tty/tty_buffer.c:533 process_one_work+0xa50/0x1710 kernel/workqueue.c:2275 worker_thread+0x65f/0x1170 kernel/workqueue.c:2421 kthread+0x3c2/0x4c0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Allocated by task 7402: kasan_save_stack+0x23/0x50 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:427 [inline] ____kasan_kmalloc mm/kasan/common.c:506 [inline] __kasan_kmalloc+0x7f/0xa0 mm/kasan/common.c:515 kasan_kmalloc include/linux/kasan.h:233 [inline] __do_kmalloc_node mm/slab.c:3635 [inline] __kmalloc_node+0x4e/0x70 mm/slab.c:3642 kmalloc_node include/linux/slab.h:577 [inline] kvmalloc_node+0x68/0x100 mm/util.c:587 kvmalloc include/linux/mm.h:785 [inline] kvzalloc include/linux/mm.h:793 [inline] alloc_netdev_mqs+0x98/0xf00 net/core/dev.c:10696 sixpack_open+0x104/0xac0 drivers/net/hamradio/6pack.c:558 tty_ldisc_open+0xa3/0x110 drivers/tty/tty_ldisc.c:463 tty_set_ldisc+0x310/0x6c0 drivers/tty/tty_ldisc.c:590 tiocsetd drivers/tty/tty_io.c:2458 [inline] tty_ioctl+0xaf5/0x17a0 drivers/tty/tty_io.c:2738 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x196/0x220 fs/ioctl.c:739 do_syscall_64+0x32/0x80 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff88810c138000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 1230 bytes to the right of 4096-byte region [ffff88810c138000, ffff88810c139000) The buggy address belongs to the page: page:00000000e0c11960 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10c138 head:00000000e0c11960 order:1 compound_mapcount:0 flags: 0x17ffe0000010200(slab|head) raw: 017ffe0000010200 ffffea000412a408 ffffea000438ec88 ffff888100040900 raw: 0000000000000000 ffff88810c138000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88810c139380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88810c139400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88810c139480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88810c139500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88810c139580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================