loop0: detected capacity change from 0 to 32768 ================================================================== BUG: KASAN: slab-out-of-bounds in dbAllocBits+0x623/0x630 fs/jfs/jfs_dmap.c:2238 Read of size 8 at addr ffff8880209d5eb8 by task syz-executor228/5000 CPU: 0 PID: 5000 Comm: syz-executor228 Not tainted 6.4.0-rc7-syzkaller-00204-g61dabacdad4e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:351 print_report mm/kasan/report.c:462 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:572 dbAllocBits+0x623/0x630 fs/jfs/jfs_dmap.c:2238 dbAllocDmap+0x61/0x110 fs/jfs/jfs_dmap.c:2015 dbAllocNear fs/jfs/jfs_dmap.c:1244 [inline] dbAlloc+0x78e/0xab0 fs/jfs/jfs_dmap.c:829 ea_get+0xc18/0x12e0 fs/jfs/xattr.c:514 __jfs_setxattr+0x1b5/0x1010 fs/jfs/xattr.c:718 __jfs_set_acl+0x87/0x190 fs/jfs/acl.c:87 jfs_set_acl+0x1fc/0x3a0 fs/jfs/acl.c:115 set_posix_acl+0x25b/0x320 fs/posix_acl.c:956 vfs_set_acl+0x5ad/0x8f0 fs/posix_acl.c:1135 do_set_acl+0xda/0x1b0 fs/posix_acl.c:1280 do_setxattr+0xc6/0x190 fs/xattr.c:627 setxattr+0x146/0x160 fs/xattr.c:653 path_setxattr+0x197/0x1c0 fs/xattr.c:672 __do_sys_lsetxattr fs/xattr.c:695 [inline] __se_sys_lsetxattr fs/xattr.c:691 [inline] __x64_sys_lsetxattr+0xc1/0x160 fs/xattr.c:691 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f29d7759829 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 14 00 00 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 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fff9d37de18 EFLAGS: 00000246 ORIG_RAX: 00000000000000bd RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 00007f29d7759829 RDX: 0000000020000180 RSI: 0000000020000040 RDI: 0000000020000000 RBP: 00007f29d77190c0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000024 R11: 0000000000000246 R12: 00007f29d7719150 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 4670: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] ____kasan_kmalloc mm/kasan/common.c:333 [inline] __kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:383 kmalloc include/linux/slab.h:559 [inline] rtnl_newlink+0x4a/0xa0 net/core/rtnetlink.c:3691 rtnetlink_rcv_msg+0x43d/0xd50 net/core/rtnetlink.c:6417 netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2546 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x925/0xe30 net/netlink/af_netlink.c:1913 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg+0xde/0x190 net/socket.c:747 ____sys_sendmsg+0x71c/0x900 net/socket.c:2503 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2557 __sys_sendmsg+0xf7/0x1c0 net/socket.c:2586 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff8880209d5000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1720 bytes to the right of allocated 2048-byte region [ffff8880209d5000, ffff8880209d5800) The buggy address belongs to the physical page: page:ffffea0000827400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x209d0 head:ffffea0000827400 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000010200 ffff888012442000 ffffea000057a200 dead000000000002 raw: 0000000000000000 0000000080080008 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 12, tgid 12 (kworker/u4:1), ts 5555005616, free_ts 0 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2db/0x350 mm/page_alloc.c:1731 prep_new_page mm/page_alloc.c:1738 [inline] get_page_from_freelist+0xf41/0x2c00 mm/page_alloc.c:3502 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:4768 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2279 alloc_slab_page mm/slub.c:1851 [inline] allocate_slab+0x25f/0x390 mm/slub.c:1998 new_slab mm/slub.c:2051 [inline] ___slab_alloc+0xa91/0x1400 mm/slub.c:3192 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3291 __slab_alloc_node mm/slub.c:3344 [inline] slab_alloc_node mm/slub.c:3441 [inline] __kmem_cache_alloc_node+0x136/0x320 mm/slub.c:3490 __do_kmalloc_node mm/slab_common.c:965 [inline] __kmalloc+0x4e/0x190 mm/slab_common.c:979 kmalloc include/linux/slab.h:563 [inline] kzalloc include/linux/slab.h:680 [inline] scsi_alloc_target+0x132/0xc90 drivers/scsi/scsi_scan.c:503 __scsi_scan_target+0x152/0xe50 drivers/scsi/scsi_scan.c:1656 scsi_scan_channel drivers/scsi/scsi_scan.c:1761 [inline] scsi_scan_channel+0x148/0x1e0 drivers/scsi/scsi_scan.c:1737 scsi_scan_host_selected+0x2e3/0x3f0 drivers/scsi/scsi_scan.c:1790 do_scsi_scan_host+0x1e8/0x260 drivers/scsi/scsi_scan.c:1929 do_scan_async+0x42/0x530 drivers/scsi/scsi_scan.c:1939 async_run_entry_fn+0x9c/0x530 kernel/async.c:127 page_owner free stack trace missing Memory state around the buggy address: ffff8880209d5d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880209d5e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880209d5e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880209d5f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880209d5f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================