==================================================================
BUG: KASAN: slab-out-of-bounds in zs_malloc+0x77/0x720
Read of size 8 at addr ffff8880222644a0 by task syz.0.91/6117

CPU: 0 UID: 60929 PID: 6117 Comm: syz.0.91 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250
 print_report+0xca/0x240
 kasan_report+0x118/0x150
 zs_malloc+0x77/0x720
 zswap_store+0x1062/0x1f40
 swap_writeout+0x710/0xd70
 shmem_writeout+0xf70/0x1210
 shrink_folio_list+0x2ff0/0x4c70
 reclaim_folio_list+0xeb/0x500
 reclaim_pages+0x454/0x520
 madvise_cold_or_pageout_pte_range+0x1974/0x1d00
 walk_pgd_range+0xfe9/0x1d40
 __walk_page_range+0x14c/0x710
 walk_page_range_vma+0x393/0x440
 madvise_vma_behavior+0x311f/0x3a10
 madvise_walk_vmas+0x51c/0xa30
 madvise_do_behavior+0x38e/0x550
 do_madvise+0x1bc/0x270
 __x64_sys_madvise+0xa7/0xc0
 do_syscall_64+0xfa/0xfa0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f2cc2b8ec29
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f2cc398e038 EFLAGS: 00000246 ORIG_RAX: 000000000000001c
RAX: ffffffffffffffda RBX: 00007f2cc2dd5fa0 RCX: 00007f2cc2b8ec29
RDX: 0000000000000015 RSI: 0000000000800000 RDI: 0000200000000000
RBP: 00007f2cc2c11e41 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f2cc2dd6038 R14: 00007f2cc2dd5fa0 R15: 00007fffe3999b78
 </TASK>

Allocated by task 1:
 kasan_save_track+0x3e/0x80
 __kasan_slab_alloc+0x6c/0x80
 kmem_cache_alloc_noprof+0x367/0x6e0
 __kernfs_new_node+0xd7/0x7e0
 kernfs_new_node+0x102/0x210
 kernfs_create_link+0xa7/0x200
 sysfs_do_create_link_sd+0x83/0x110
 device_create_sys_dev_entry+0x11a/0x180
 device_add+0x733/0xb50
 device_create+0x25b/0x2f0
 mon_bin_add+0xb6/0x130
 mon_bus_init+0x162/0x2a0
 mon_notify+0x112/0x3f0
 notifier_call_chain+0x1b6/0x3e0
 blocking_notifier_call_chain+0x6a/0x90
 usb_register_bus+0xcf/0x150
 usb_add_hcd+0x451/0x1050
 dummy_hcd_probe+0x134/0x270
 platform_probe+0xf9/0x190
 really_probe+0x26d/0x9e0
 __driver_probe_device+0x18c/0x2f0
 driver_probe_device+0x4f/0x430
 __device_attach_driver+0x2ce/0x530
 bus_for_each_drv+0x251/0x2e0
 __device_attach+0x2b8/0x400
 bus_probe_device+0x185/0x260
 device_add+0x7b6/0xb50
 platform_device_add+0x4b4/0x820
 dummy_hcd_init+0x57f/0xbd0
 do_one_initcall+0x236/0x820
 do_initcall_level+0x104/0x190
 do_initcalls+0x59/0xa0
 kernel_init_freeable+0x334/0x4b0
 kernel_init+0x1d/0x1d0
 ret_from_fork+0x4bc/0x870
 ret_from_fork_asm+0x1a/0x30

The buggy address belongs to the object at ffff8880222643c0
 which belongs to the cache kernfs_node_cache of size 176
The buggy address is located 48 bytes to the right of
 allocated 176-byte region [ffff8880222643c0, ffff888022264470)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x22264
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000000 ffff88801ba99dc0 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000110011 00000000f5000000 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 1, tgid 1 (swapper/0), ts 12536236438, free_ts 9306167773
 post_alloc_hook+0x240/0x2a0
 get_page_from_freelist+0x21e4/0x22c0
 __alloc_frozen_pages_noprof+0x181/0x370
 alloc_pages_mpol+0x232/0x4a0
 allocate_slab+0x96/0x3a0
 ___slab_alloc+0xe94/0x1920
 __slab_alloc+0x65/0x100
 kmem_cache_alloc_noprof+0x3f9/0x6e0
 __kernfs_new_node+0xd7/0x7e0
 kernfs_new_node+0x102/0x210
 __kernfs_create_file+0x4b/0x2e0
 sysfs_add_file_mode_ns+0x238/0x300
 sysfs_merge_group+0x177/0x310
 dpm_sysfs_add+0xd2/0x270
 device_add+0x4d8/0xb50
 device_create+0x25b/0x2f0
page last free pid 24 tgid 24 stack trace:
 __free_frozen_pages+0xbc4/0xd30
 vfree+0x25a/0x400
 delayed_vfree_work+0x55/0x80
 process_scheduled_works+0xae1/0x17b0
 worker_thread+0x8a0/0xda0
 kthread+0x711/0x8a0
 ret_from_fork+0x4bc/0x870
 ret_from_fork_asm+0x1a/0x30

Memory state around the buggy address:
 ffff888022264380: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00
 ffff888022264400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc
>ffff888022264480: fc fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00
                               ^
 ffff888022264500: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc
 ffff888022264580: fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
