loop0: detected capacity change from 0 to 32768 ================================================================== BUG: KASAN: slab-out-of-bounds in jfs_readdir+0x375e/0x4230 fs/jfs/jfs_dtree.c:2889 Read of size 1 at addr ffff8880482820f5 by task syz-executor.0/9512 CPU: 0 PID: 9512 Comm: syz-executor.0 Not tainted 6.2.0-rc3-syzkaller-00030-ge8f60cd7db24 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd1/0x138 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:306 [inline] print_report+0x15e/0x461 mm/kasan/report.c:417 kasan_report+0xbf/0x1f0 mm/kasan/report.c:517 jfs_readdir+0x375e/0x4230 fs/jfs/jfs_dtree.c:2889 iterate_dir+0x1fd/0x6f0 fs/readdir.c:67 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64 fs/readdir.c:354 [inline] __x64_sys_getdents64+0x13e/0x2c0 fs/readdir.c:354 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:0x7f1a6d68c0c9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f1a6e4ab168 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007f1a6d7abf80 RCX: 00007f1a6d68c0c9 RDX: 00000000000000c5 RSI: 0000000020000200 RDI: 0000000000000004 RBP: 00007f1a6d6e7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe166cec8f R14: 00007f1a6e4ab300 R15: 0000000000022000 Allocated by task 9512: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 __kasan_slab_alloc+0x7f/0x90 mm/kasan/common.c:325 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slab.h:761 [inline] slab_alloc_node mm/slab.c:3261 [inline] slab_alloc mm/slab.c:3270 [inline] __kmem_cache_alloc_lru mm/slab.c:3447 [inline] kmem_cache_alloc_lru+0x249/0x7b0 mm/slab.c:3463 alloc_inode_sb include/linux/fs.h:3119 [inline] jfs_alloc_inode+0x27/0x60 fs/jfs/super.c:105 alloc_inode+0x61/0x230 fs/inode.c:259 iget_locked+0x1bb/0x700 fs/inode.c:1286 jfs_iget+0x1e/0x4d0 fs/jfs/inode.c:29 jfs_fill_super+0x6a8/0xc80 fs/jfs/super.c:580 mount_bdev+0x351/0x410 fs/super.c:1359 legacy_get_tree+0x109/0x220 fs/fs_context.c:610 vfs_get_tree+0x8d/0x2f0 fs/super.c:1489 do_new_mount fs/namespace.c:3145 [inline] path_mount+0x132a/0x1e20 fs/namespace.c:3475 do_mount fs/namespace.c:3488 [inline] __do_sys_mount fs/namespace.c:3697 [inline] __se_sys_mount fs/namespace.c:3674 [inline] __x64_sys_mount+0x283/0x300 fs/namespace.c:3674 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 ffff888048282180 which belongs to the cache jfs_ip of size 2240 The buggy address is located 139 bytes to the left of 2240-byte region [ffff888048282180, ffff888048282a40) The buggy address belongs to the physical page: page:ffffea000120a080 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888048282fff pfn:0x48282 memcg:ffff888072a5bd81 flags: 0x4fff00000000200(slab|node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000200 ffff8880437e8800 ffffea0001204350 ffff888043094950 raw: ffff888048282fff ffff888048282180 0000000100000001 ffff888072a5bd81 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Reclaimable, gfp_mask 0x140c50(GFP_NOFS|__GFP_COMP|__GFP_HARDWALL|__GFP_RECLAIMABLE), pid 9512, tgid 9511 (syz-executor.0), ts 323448948473, free_ts 300171198275 prep_new_page mm/page_alloc.c:2531 [inline] get_page_from_freelist+0x119c/0x2ce0 mm/page_alloc.c:4283 __alloc_pages+0x1cb/0x5b0 mm/page_alloc.c:5549 __alloc_pages_node include/linux/gfp.h:237 [inline] kmem_getpages mm/slab.c:1363 [inline] cache_grow_begin+0x94/0x390 mm/slab.c:2574 fallback_alloc+0x1e2/0x2d0 mm/slab.c:3117 __do_cache_alloc mm/slab.c:3221 [inline] slab_alloc_node mm/slab.c:3254 [inline] slab_alloc mm/slab.c:3270 [inline] __kmem_cache_alloc_lru mm/slab.c:3447 [inline] kmem_cache_alloc_lru+0x398/0x7b0 mm/slab.c:3463 alloc_inode_sb include/linux/fs.h:3119 [inline] jfs_alloc_inode+0x27/0x60 fs/jfs/super.c:105 alloc_inode+0x61/0x230 fs/inode.c:259 iget_locked+0x1bb/0x700 fs/inode.c:1286 jfs_iget+0x1e/0x4d0 fs/jfs/inode.c:29 jfs_fill_super+0x6a8/0xc80 fs/jfs/super.c:580 mount_bdev+0x351/0x410 fs/super.c:1359 legacy_get_tree+0x109/0x220 fs/fs_context.c:610 vfs_get_tree+0x8d/0x2f0 fs/super.c:1489 do_new_mount fs/namespace.c:3145 [inline] path_mount+0x132a/0x1e20 fs/namespace.c:3475 do_mount fs/namespace.c:3488 [inline] __do_sys_mount fs/namespace.c:3697 [inline] __se_sys_mount fs/namespace.c:3674 [inline] __x64_sys_mount+0x283/0x300 fs/namespace.c:3674 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1446 [inline] free_pcp_prepare+0x65c/0xc00 mm/page_alloc.c:1496 free_unref_page_prepare mm/page_alloc.c:3369 [inline] free_unref_page+0x1d/0x490 mm/page_alloc.c:3464 slab_destroy mm/slab.c:1619 [inline] slabs_destroy+0x85/0xc0 mm/slab.c:1639 __cache_free_alien mm/slab.c:774 [inline] cache_free_alien mm/slab.c:790 [inline] ___cache_free+0x204/0x3d0 mm/slab.c:3421 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x4f/0x1a0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x192/0x220 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x63/0x90 mm/kasan/common.c:302 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slab.h:761 [inline] slab_alloc_node mm/slab.c:3261 [inline] __kmem_cache_alloc_node+0x26b/0x510 mm/slab.c:3544 __do_kmalloc_node mm/slab_common.c:967 [inline] __kmalloc_node+0x4d/0xd0 mm/slab_common.c:975 kmalloc_node include/linux/slab.h:610 [inline] __vmalloc_area_node mm/vmalloc.c:3043 [inline] __vmalloc_node_range+0xa11/0x13c0 mm/vmalloc.c:3227 __vmalloc_node mm/vmalloc.c:3292 [inline] vzalloc+0x6b/0x80 mm/vmalloc.c:3365 do_ipt_get_ctl+0x611/0x9e0 net/ipv4/netfilter/ip_tables.c:801 nf_getsockopt+0x76/0xd0 net/netfilter/nf_sockopt.c:116 ip_getsockopt+0x189/0x1e0 net/ipv4/ip_sockglue.c:1797 tcp_getsockopt+0x99/0x100 net/ipv4/tcp.c:4406 __sys_getsockopt+0x21a/0x6a0 net/socket.c:2290 Memory state around the buggy address: ffff888048281f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888048282000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888048282080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888048282100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888048282180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================