================================================================== BUG: KASAN: slab-out-of-bounds in ocfs2_replay_truncate_records fs/ocfs2/alloc.c:5959 [inline] BUG: KASAN: slab-out-of-bounds in __ocfs2_flush_truncate_log+0x824/0x1240 fs/ocfs2/alloc.c:6054 Read of size 4 at addr ffff888040019240 by task syz-executor301/5299 CPU: 0 UID: 0 PID: 5299 Comm: syz-executor301 Not tainted 6.13.0-rc7-syzkaller-00191-gfda5e3f28400 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x169/0x550 mm/kasan/report.c:489 kasan_report+0x143/0x180 mm/kasan/report.c:602 ocfs2_replay_truncate_records fs/ocfs2/alloc.c:5959 [inline] __ocfs2_flush_truncate_log+0x824/0x1240 fs/ocfs2/alloc.c:6054 ocfs2_flush_truncate_log+0x4f/0x70 fs/ocfs2/alloc.c:6076 ocfs2_sync_fs+0x125/0x390 fs/ocfs2/super.c:402 sync_filesystem+0x1c8/0x230 fs/sync.c:66 generic_shutdown_super+0x72/0x2d0 fs/super.c:621 kill_block_super+0x44/0x90 fs/super.c:1710 deactivate_locked_super+0xc4/0x130 fs/super.c:473 cleanup_mnt+0x41f/0x4b0 fs/namespace.c:1373 task_work_run+0x24f/0x310 kernel/task_work.c:239 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x13f/0x340 kernel/entry/common.c:218 do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f64685c4d77 Code: 08 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b0 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffe67a67008 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f64685c4d77 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffe67a670c0 RBP: 00007ffe67a670c0 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000202 R12: 00007ffe67a68130 R13: 00005555790d88e0 R14: 00007ffe67a68150 R15: 431bde82d7b634db Allocated by task 5016: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:319 [inline] __kasan_slab_alloc+0x66/0x80 mm/kasan/common.c:345 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4119 [inline] slab_alloc_node mm/slub.c:4168 [inline] kmem_cache_alloc_node_noprof+0x1d9/0x380 mm/slub.c:4220 __alloc_skb+0x1c3/0x440 net/core/skbuff.c:668 __netdev_alloc_skb+0x103/0xa00 net/core/skbuff.c:742 __netdev_alloc_skb_ip_align include/linux/skbuff.h:3422 [inline] e1000_alloc_rx_buffers+0x1fd/0x6f0 drivers/net/ethernet/intel/e1000e/netdev.c:668 e1000_configure+0x3824/0x4210 drivers/net/ethernet/intel/e1000e/netdev.c:3755 e1000e_open+0x39f/0xb80 drivers/net/ethernet/intel/e1000e/netdev.c:4653 __dev_open+0x2d3/0x450 net/core/dev.c:1506 __dev_change_flags+0x1e2/0x6f0 net/core/dev.c:8968 dev_change_flags+0x8b/0x1a0 net/core/dev.c:9040 devinet_ioctl+0xcce/0x1ac0 net/ipv4/devinet.c:1208 inet_ioctl+0x3d7/0x4f0 net/ipv4/af_inet.c:1001 sock_do_ioctl+0x158/0x460 net/socket.c:1209 sock_ioctl+0x626/0x8e0 net/socket.c:1328 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl+0xf5/0x170 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888040019140 which belongs to the cache skbuff_head_cache of size 240 The buggy address is located 16 bytes to the right of allocated 240-byte region [ffff888040019140, ffff888040019230) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x40019 flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 04fff00000000000 ffff888030e8f780 dead000000000122 0000000000000000 raw: 0000000000000000 00000000000c000c 00000001f5000000 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 5016, tgid 5016 (dhcpcd), ts 45117454441, free_ts 44988214155 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1558 prep_new_page mm/page_alloc.c:1566 [inline] get_page_from_freelist+0x365c/0x37a0 mm/page_alloc.c:3476 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4753 alloc_pages_mpol_noprof+0x3e1/0x780 mm/mempolicy.c:2269 alloc_slab_page+0x6a/0x110 mm/slub.c:2423 allocate_slab+0x5a/0x2b0 mm/slub.c:2589 new_slab mm/slub.c:2642 [inline] ___slab_alloc+0xc27/0x14a0 mm/slub.c:3830 __slab_alloc+0x58/0xa0 mm/slub.c:3920 __slab_alloc_node mm/slub.c:3995 [inline] slab_alloc_node mm/slub.c:4156 [inline] kmem_cache_alloc_node_noprof+0x269/0x380 mm/slub.c:4220 __alloc_skb+0x1c3/0x440 net/core/skbuff.c:668 __netdev_alloc_skb+0x103/0xa00 net/core/skbuff.c:742 __netdev_alloc_skb_ip_align include/linux/skbuff.h:3422 [inline] e1000_alloc_rx_buffers+0x1fd/0x6f0 drivers/net/ethernet/intel/e1000e/netdev.c:668 e1000_configure+0x3824/0x4210 drivers/net/ethernet/intel/e1000e/netdev.c:3755 e1000e_open+0x39f/0xb80 drivers/net/ethernet/intel/e1000e/netdev.c:4653 __dev_open+0x2d3/0x450 net/core/dev.c:1506 __dev_change_flags+0x1e2/0x6f0 net/core/dev.c:8968 page last free pid 5094 tgid 5094 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_page+0xd3f/0x1010 mm/page_alloc.c:2659 __slab_free+0x2c2/0x380 mm/slub.c:4524 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9a/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4119 [inline] slab_alloc_node mm/slub.c:4168 [inline] __kmalloc_cache_noprof+0x1d9/0x390 mm/slub.c:4324 kmalloc_noprof include/linux/slab.h:901 [inline] tomoyo_print_header security/tomoyo/audit.c:156 [inline] tomoyo_init_log+0x1ca/0x2050 security/tomoyo/audit.c:255 tomoyo_supervisor+0x38a/0x11f0 security/tomoyo/common.c:2089 tomoyo_audit_path_log security/tomoyo/file.c:168 [inline] tomoyo_path_permission+0x243/0x360 security/tomoyo/file.c:587 tomoyo_check_open_permission+0x307/0x4f0 security/tomoyo/file.c:777 security_file_open+0xac/0x250 security/security.c:3105 do_dentry_open+0x328/0x1b70 fs/open.c:928 vfs_open+0x3e/0x330 fs/open.c:1075 do_open fs/namei.c:3828 [inline] path_openat+0x2c84/0x3590 fs/namei.c:3987 do_filp_open+0x27f/0x4e0 fs/namei.c:4014 do_sys_openat2+0x13e/0x1d0 fs/open.c:1402 Memory state around the buggy address: ffff888040019100: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ffff888040019180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888040019200: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc ^ ffff888040019280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888040019300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc ==================================================================