================================================================== BUG: KASAN: slab-use-after-free in dbAllocBits+0x618/0x630 fs/jfs/jfs_dmap.c:2255 Read of size 8 at addr ffff88807ed99eb8 by task syz-executor243/5061 CPU: 0 PID: 5061 Comm: syz-executor243 Not tainted 6.7.0-rc6-syzkaller-00044-g1a44b0073b92 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 dbAllocBits+0x618/0x630 fs/jfs/jfs_dmap.c:2255 dbAllocDmap+0x5c/0x100 fs/jfs/jfs_dmap.c:2032 dbAllocNear fs/jfs/jfs_dmap.c:1258 [inline] dbAlloc+0x780/0xaa0 fs/jfs/jfs_dmap.c:843 ea_get+0xc0d/0x12c0 fs/jfs/xattr.c:514 __jfs_setxattr+0x1ed/0x1060 fs/jfs/xattr.c:718 __jfs_set_acl+0x110/0x1a0 fs/jfs/acl.c:87 jfs_set_acl+0x252/0x330 fs/jfs/acl.c:115 set_posix_acl+0x259/0x320 fs/posix_acl.c:956 vfs_set_acl+0x539/0x900 fs/posix_acl.c:1135 do_set_acl+0xda/0x1b0 fs/posix_acl.c:1280 do_setxattr+0xeb/0x170 fs/xattr.c:627 setxattr+0x159/0x170 fs/xattr.c:653 path_setxattr+0x175/0x1d0 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:52 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7efec3bb7ad9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 17 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:00007ffea82e0608 EFLAGS: 00000246 ORIG_RAX: 00000000000000bd RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 00007efec3bb7ad9 RDX: 0000000020000180 RSI: 0000000020000040 RDI: 0000000020000000 RBP: 00007efec3c305f0 R08: 0000000000000000 R09: 0000555556d744c0 R10: 0000000000000024 R11: 0000000000000246 R12: 00007ffea82e0630 R13: 00007ffea82e0858 R14: 431bde82d7b634db R15: 00007efec3c0003b Allocated by task 5048: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 __kasan_slab_alloc+0x81/0x90 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook mm/slab.h:763 [inline] kmem_cache_alloc_bulk+0x32e/0x3f0 mm/slab.c:3481 napi_skb_cache_get+0xf7/0x190 net/core/skbuff.c:331 __napi_build_skb+0x14/0x50 net/core/skbuff.c:510 __napi_alloc_skb+0x3a7/0x6f0 net/core/skbuff.c:829 napi_alloc_skb include/linux/skbuff.h:3282 [inline] page_to_skb+0x150/0xac0 drivers/net/virtio_net.c:540 receive_mergeable drivers/net/virtio_net.c:1651 [inline] receive_buf+0x115a/0x50e0 drivers/net/virtio_net.c:1772 virtnet_receive drivers/net/virtio_net.c:2077 [inline] virtnet_poll+0x9be/0x15d0 drivers/net/virtio_net.c:2151 __napi_poll.constprop.0+0xb4/0x540 net/core/dev.c:6533 napi_poll net/core/dev.c:6602 [inline] net_rx_action+0x956/0xe90 net/core/dev.c:6735 __do_softirq+0x21a/0x8de kernel/softirq.c:553 Freed by task 5048: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x28/0x40 mm/kasan/generic.c:522 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x138/0x190 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:164 [inline] __cache_free mm/slab.c:3370 [inline] __do_kmem_cache_free mm/slab.c:3557 [inline] kmem_cache_free+0x104/0x390 mm/slab.c:3582 kfree_skbmem+0xef/0x1b0 net/core/skbuff.c:1015 __kfree_skb net/core/skbuff.c:1073 [inline] kfree_skb_partial+0x9b/0xb0 net/core/skbuff.c:5744 tcp_data_queue+0x1c8d/0x5190 net/ipv4/tcp_input.c:5228 tcp_rcv_established+0x8ba/0x20e0 net/ipv4/tcp_input.c:6177 tcp_v4_do_rcv+0x68c/0xa10 net/ipv4/tcp_ipv4.c:1906 tcp_v4_rcv+0x3892/0x3b40 net/ipv4/tcp_ipv4.c:2329 ip_protocol_deliver_rcu+0x9f/0x480 net/ipv4/ip_input.c:205 ip_local_deliver_finish+0x2e4/0x510 net/ipv4/ip_input.c:233 NF_HOOK include/linux/netfilter.h:314 [inline] NF_HOOK include/linux/netfilter.h:308 [inline] ip_local_deliver+0x18e/0x1f0 net/ipv4/ip_input.c:254 dst_input include/net/dst.h:461 [inline] ip_sublist_rcv_finish+0x99/0x2e0 net/ipv4/ip_input.c:580 ip_list_rcv_finish.constprop.0+0x560/0x720 net/ipv4/ip_input.c:631 ip_sublist_rcv net/ipv4/ip_input.c:639 [inline] ip_list_rcv+0x339/0x440 net/ipv4/ip_input.c:674 __netif_receive_skb_list_ptype net/core/dev.c:5572 [inline] __netif_receive_skb_list_core+0x52c/0x8a0 net/core/dev.c:5620 __netif_receive_skb_list net/core/dev.c:5672 [inline] netif_receive_skb_list_internal+0x769/0xe00 net/core/dev.c:5763 gro_normal_list include/net/gro.h:439 [inline] gro_normal_list include/net/gro.h:435 [inline] napi_complete_done+0x23f/0x990 net/core/dev.c:6103 virtqueue_napi_complete drivers/net/virtio_net.c:440 [inline] virtnet_poll+0xf4a/0x15d0 drivers/net/virtio_net.c:2158 __napi_poll.constprop.0+0xb4/0x540 net/core/dev.c:6533 napi_poll net/core/dev.c:6602 [inline] net_rx_action+0x956/0xe90 net/core/dev.c:6735 __do_softirq+0x21a/0x8de kernel/softirq.c:553 The buggy address belongs to the object at ffff88807ed99e80 which belongs to the cache skbuff_head_cache of size 240 The buggy address is located 56 bytes inside of freed 240-byte region [ffff88807ed99e80, ffff88807ed99f70) The buggy address belongs to the physical page: page:ffffea0001fb6640 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7ed99 flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xc() raw: 00fff00000000800 ffff888013e8bc00 ffffea0001fb6610 ffffea00007f2110 raw: 0000000000000000 ffff88807ed990c0 000000010000000c 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 0x242020(__GFP_HIGH|__GFP_NOWARN|__GFP_COMP|__GFP_THISNODE), pid 5048, tgid 5048 (sshd), ts 70903167232, free_ts 70878847243 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d0/0x350 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1544 [inline] get_page_from_freelist+0xa25/0x36d0 mm/page_alloc.c:3312 __alloc_pages+0x22e/0x2420 mm/page_alloc.c:4568 __alloc_pages_node include/linux/gfp.h:238 [inline] kmem_getpages mm/slab.c:1356 [inline] cache_grow_begin+0x99/0x3a0 mm/slab.c:2550 cache_alloc_refill+0x295/0x3b0 mm/slab.c:2923 ____cache_alloc mm/slab.c:2999 [inline] ____cache_alloc mm/slab.c:2982 [inline] __do_cache_alloc mm/slab.c:3182 [inline] kmem_cache_alloc_bulk+0x263/0x3f0 mm/slab.c:3467 napi_skb_cache_get+0xf7/0x190 net/core/skbuff.c:331 __napi_build_skb+0x14/0x50 net/core/skbuff.c:510 __napi_alloc_skb+0x3a7/0x6f0 net/core/skbuff.c:829 napi_alloc_skb include/linux/skbuff.h:3282 [inline] page_to_skb+0x150/0xac0 drivers/net/virtio_net.c:540 receive_mergeable drivers/net/virtio_net.c:1651 [inline] receive_buf+0x115a/0x50e0 drivers/net/virtio_net.c:1772 virtnet_receive drivers/net/virtio_net.c:2077 [inline] virtnet_poll+0x9be/0x15d0 drivers/net/virtio_net.c:2151 __napi_poll.constprop.0+0xb4/0x540 net/core/dev.c:6533 napi_poll net/core/dev.c:6602 [inline] net_rx_action+0x956/0xe90 net/core/dev.c:6735 __do_softirq+0x21a/0x8de kernel/softirq.c:553 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1137 [inline] free_unref_page_prepare+0x4fa/0xaa0 mm/page_alloc.c:2347 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2487 slab_destroy mm/slab.c:1608 [inline] slabs_destroy+0x85/0xc0 mm/slab.c:1628 cache_flusharray mm/slab.c:3341 [inline] ___cache_free+0x2b7/0x420 mm/slab.c:3404 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x4c/0x1b0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x18e/0x1d0 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x65/0x90 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook mm/slab.h:763 [inline] slab_alloc_node mm/slab.c:3237 [inline] slab_alloc mm/slab.c:3246 [inline] __kmem_cache_alloc_lru mm/slab.c:3423 [inline] kmem_cache_alloc+0x159/0x360 mm/slab.c:3432 vm_area_alloc+0x1f/0x220 kernel/fork.c:485 mmap_region+0x3a5/0x2830 mm/mmap.c:2836 do_mmap+0x893/0xef0 mm/mmap.c:1379 vm_mmap_pgoff+0x1a8/0x3c0 mm/util.c:556 ksys_mmap_pgoff+0x422/0x5b0 mm/mmap.c:1425 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:93 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline] __x64_sys_mmap+0x125/0x190 arch/x86/kernel/sys_x86_64.c:86 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b Memory state around the buggy address: ffff88807ed99d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807ed99e00: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc >ffff88807ed99e80: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88807ed99f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc ffff88807ed99f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================