================================================================== BUG: KASAN: slab-out-of-bounds in __lock_acquire+0x49f6/0x6ba0 kernel/locking/lockdep.c:4225 Read of size 8 at addr ffff88808221b5a0 by task kworker/0:4/3526 CPU: 0 PID: 3526 Comm: kworker/0:4 Not tainted 5.7.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events request_firmware_work_func Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x96/0xe0 lib/dump_stack.c:118 print_address_description.constprop.4.cold.6+0x9/0x373 mm/kasan/report.c:382 __kasan_report.cold.7+0x92/0xaf mm/kasan/report.c:511 kasan_report+0x37/0x50 mm/kasan/common.c:625 __lock_acquire+0x49f6/0x6ba0 kernel/locking/lockdep.c:4225 lock_acquire+0x178/0xa70 kernel/locking/lockdep.c:4934 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x33/0x50 kernel/locking/spinlock.c:159 ath9k_htc_rxep+0x23/0x220 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:1127 ath9k_hif_usb_reg_in_cb+0x18e/0x680 drivers/net/wireless/ath/ath9k/hif_usb.c:718 __usb_hcd_giveback_urb+0x1b6/0x3c0 drivers/usb/core/hcd.c:1648 freedev drivers/block/aoe/aoedev.c:285 [inline] dummy_timer+0xfc6/0x2d0d drivers/block/aoe/aoedev.c:366 call_timer_fn+0x16f/0x5b0 kernel/time/timer.c:1405 expire_timers kernel/time/timer.c:1450 [inline] __run_timers kernel/time/timer.c:1774 [inline] run_timer_softirq+0x687/0x11a0 kernel/time/timer.c:1787 __do_softirq+0x24a/0xaec kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x167/0x190 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:546 [inline] smp_apic_timer_interrupt+0x1d0/0x690 arch/x86/kernel/apic/apic.c:1140 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829 RIP: 0010:native_restore_fl arch/x86/include/asm/irqflags.h:41 [inline] RIP: 0010:arch_local_irq_restore arch/x86/include/asm/irqflags.h:84 [inline] RIP: 0010:console_unlock+0x760/0xa30 kernel/printk/printk.c:2506 Code: 48 c7 c7 e0 98 58 8a e8 1e 10 03 00 65 ff 0d 3f 2a ad 7e 0f 85 d8 fb ff ff e8 87 67 ab ff e9 ce fb ff ff e8 82 6d 1a 00 55 9d b8 f9 ff ff 48 8d 79 08 48 89 f8 48 c1 e8 03 42 0f b6 14 38 48 RSP: 0018:ffffc900019afb20 EFLAGS: 00000247 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000007 RBX: 0000000000000200 RCX: 1ffffffff1c88dcd RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8880aa64231c RBP: 0000000000000247 R08: 0000000000000001 R09: fffffbfff1c88ccd R10: ffffffff8e446667 R11: fffffbfff1c88ccc R12: 0000000000000000 R13: ffffffff8b5243f0 R14: ffffffff8b524428 R15: dffffc0000000000 vprintk_emit+0xe1/0x2b0 kernel/printk/printk.c:2021 printk+0x9a/0xc0 kernel/printk/printk.c:2081 ath9k_htc_hw_init.cold.3+0xc/0x21 drivers/net/wireless/ath/ath9k/htc_hst.c:502 ath9k_hif_usb_firmware_cb+0x241/0x590 drivers/net/wireless/ath/ath9k/hif_usb.c:1187 request_firmware_work_func+0x121/0x23e drivers/base/firmware_loader/main.c:1005 process_one_work+0x904/0x1690 kernel/workqueue.c:2268 worker_thread+0x82/0xb50 kernel/workqueue.c:2414 kthread+0x340/0x410 kernel/kthread.c:268 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:351 Allocated by task 5658: save_stack+0x19/0x40 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] __kasan_kmalloc mm/kasan/common.c:495 [inline] __kasan_kmalloc.constprop.15+0xc1/0xd0 mm/kasan/common.c:468 kmalloc include/linux/slab.h:560 [inline] tomoyo_realpath_from_path+0xad/0x660 security/tomoyo/realpath.c:252 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x226/0x3c0 security/tomoyo/file.c:822 security_inode_getattr+0xab/0x100 security/security.c:1273 vfs_getattr+0x17/0x40 fs/stat.c:117 vfs_statx+0xcb/0x130 fs/stat.c:201 vfs_lstat include/linux/fs.h:3284 [inline] __do_sys_newlstat+0x77/0xd0 fs/stat.c:364 do_syscall_64+0x98/0x560 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 Freed by task 5658: save_stack+0x19/0x40 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] kasan_set_free_info mm/kasan/common.c:317 [inline] __kasan_slab_free+0x124/0x170 mm/kasan/common.c:456 slab_free_hook mm/slub.c:1455 [inline] slab_free_freelist_hook+0x53/0x140 mm/slub.c:1488 slab_free mm/slub.c:3045 [inline] kfree+0xd6/0x3c0 mm/slub.c:4026 tomoyo_realpath_from_path+0x144/0x660 security/tomoyo/realpath.c:289 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x226/0x3c0 security/tomoyo/file.c:822 security_inode_getattr+0xab/0x100 security/security.c:1273 vfs_getattr+0x17/0x40 fs/stat.c:117 vfs_statx+0xcb/0x130 fs/stat.c:201 vfs_lstat include/linux/fs.h:3284 [inline] __do_sys_newlstat+0x77/0xd0 fs/stat.c:364 do_syscall_64+0x98/0x560 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 The buggy address belongs to the object at ffff88808221a000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 1440 bytes to the right of 4096-byte region [ffff88808221a000, ffff88808221b000) The buggy address belongs to the page: page:ffffea0002088600 refcount:1 mapcount:0 mapping:000000006ce53099 index:0x0 head:ffffea0002088600 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff8880b580c280 raw: 0000000000000000 0000000000040004 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC) set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook mm/page_alloc.c:2202 [inline] prep_new_page+0x12f/0x240 mm/page_alloc.c:2208 get_page_from_freelist+0x10f6/0x45d0 mm/page_alloc.c:3762 __alloc_pages_nodemask+0x294/0x820 mm/page_alloc.c:4812 alloc_pages include/linux/gfp.h:540 [inline] alloc_slab_page+0x334/0x520 mm/slub.c:1526 allocate_slab mm/slub.c:1671 [inline] new_slab+0x84/0x440 mm/slub.c:1737 new_slab_objects mm/slub.c:2486 [inline] ___slab_alloc+0x465/0x770 mm/slub.c:2647 __slab_alloc.isra.45+0x74/0xe0 mm/slub.c:2687 slab_alloc_node mm/slub.c:2761 [inline] slab_alloc mm/slub.c:2805 [inline] __kmalloc+0x1af/0x1f0 mm/slub.c:3868 kmalloc include/linux/slab.h:560 [inline] tomoyo_realpath_from_path+0xad/0x660 security/tomoyo/realpath.c:252 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x226/0x3c0 security/tomoyo/file.c:822 security_inode_getattr+0xab/0x100 security/security.c:1273 vfs_getattr+0x17/0x40 fs/stat.c:117 vfs_statx+0xcb/0x130 fs/stat.c:201 vfs_lstat include/linux/fs.h:3284 [inline] __do_sys_newlstat+0x77/0xd0 fs/stat.c:364 do_syscall_64+0x98/0x560 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1215 [inline] __free_pages_ok+0x5df/0xe50 mm/page_alloc.c:1472 kfree+0x311/0x3c0 mm/slub.c:4023 device_release+0x65/0x1c0 drivers/base/core.c:1375 kobject_cleanup lib/kobject.c:693 [inline] kobject_release lib/kobject.c:722 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x191/0x430 lib/kobject.c:739 ath9k_htc_probe_device+0x1aa/0x2380 drivers/net/wireless/ath/ath9k/htc_drv_init.c:972 ath9k_htc_hw_init+0x8/0x20 drivers/net/wireless/ath/ath9k/htc_hst.c:501 ath9k_hif_usb_firmware_cb+0x241/0x590 drivers/net/wireless/ath/ath9k/hif_usb.c:1187 request_firmware_work_func+0x121/0x23e drivers/base/firmware_loader/main.c:1005 process_one_work+0x904/0x1690 kernel/workqueue.c:2268 worker_thread+0x82/0xb50 kernel/workqueue.c:2414 kthread+0x340/0x410 kernel/kthread.c:268 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:351 Memory state around the buggy address: ffff88808221b480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808221b500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88808221b580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88808221b600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808221b680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================