RBP: 00007fe0d7f00c88 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fe0d7fc3f80 R15: 00007fffc2941c08 ================================================================== BUG: KASAN: slab-out-of-bounds in f2fs_truncate_data_blocks_range+0x7fb/0xeb0 fs/f2fs/file.c:581 Read of size 4 at addr ffff88810c15f000 by task syz-executor.0/354 CPU: 0 PID: 354 Comm: syz-executor.0 Not tainted 5.10.222-syzkaller-1003210-gfd58936f3c1f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118 print_address_description+0x81/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0x179/0x1c0 mm/kasan/report.c:452 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 f2fs_truncate_data_blocks_range+0x7fb/0xeb0 fs/f2fs/file.c:581 f2fs_truncate_data_blocks+0xfa/0x140 fs/f2fs/file.c:638 truncate_dnode fs/f2fs/node.c:943 [inline] f2fs_truncate_inode_blocks+0x780/0x1200 fs/f2fs/node.c:1155 f2fs_do_truncate_blocks+0x753/0xb80 fs/f2fs/file.c:727 f2fs_truncate_blocks+0x114/0x310 fs/f2fs/file.c:755 f2fs_truncate+0x1b9/0x3c0 fs/f2fs/file.c:807 f2fs_setattr+0x9e3/0x10f0 fs/f2fs/file.c:971 notify_change+0xbb6/0xe60 fs/attr.c:410 do_truncate+0x1ed/0x2d0 fs/open.c:65 handle_truncate fs/namei.c:3054 [inline] do_open fs/namei.c:3395 [inline] path_openat+0x298d/0x3000 fs/namei.c:3509 do_filp_open+0x21c/0x460 fs/namei.c:3536 do_sys_openat2+0x13f/0x710 fs/open.c:1217 do_sys_open fs/open.c:1233 [inline] __do_sys_creat fs/open.c:1307 [inline] __se_sys_creat fs/open.c:1301 [inline] __x64_sys_creat+0x11f/0x160 fs/open.c:1301 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fe0d7ea4959 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fe0d7a270c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007fe0d7fc3f80 RCX: 00007fe0d7ea4959 RDX: 0000000000000000 RSI: 00000000000001f8 RDI: 00000000200000c0 RBP: 00007fe0d7f00c88 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fe0d7fc3f80 R15: 00007fffc2941c08 Allocated by task 0: (stack is not available) The buggy address belongs to the object at ffff88810c15f000 which belongs to the cache ip6_dst_cache of size 240 The buggy address is located 0 bytes inside of 240-byte region [ffff88810c15f000, ffff88810c15f0f0) The buggy address belongs to the page: page:ffffea00043057c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10c15f flags: 0x4000000000000200(slab) raw: 4000000000000200 dead000000000100 dead000000000122 ffff88810b712480 raw: 0000000000000000 00000000800c000c 00000001ffffffff 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 0x112a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 354, ts 54034768606, free_ts 52823856401 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x166/0x180 mm/page_alloc.c:2462 get_page_from_freelist+0x2d8c/0x2f30 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x435/0xaf0 mm/page_alloc.c:5348 allocate_slab mm/slub.c:1808 [inline] new_slab+0x80/0x400 mm/slub.c:1869 new_slab_objects mm/slub.c:2627 [inline] ___slab_alloc+0x302/0x4b0 mm/slub.c:2791 __slab_alloc+0x63/0xa0 mm/slub.c:2831 slab_alloc_node mm/slub.c:2913 [inline] slab_alloc mm/slub.c:2955 [inline] kmem_cache_alloc+0x1b9/0x2e0 mm/slub.c:2960 dst_alloc+0x17d/0x590 net/core/dst.c:93 ip6_dst_alloc net/ipv6/route.c:340 [inline] icmp6_dst_alloc+0xfc/0x560 net/ipv6/route.c:3164 ndisc_send_skb+0x25a/0xc00 net/ipv6/ndisc.c:489 ndisc_send_rs+0x532/0x6a0 net/ipv6/ndisc.c:703 addrconf_rs_timer+0x2d1/0x600 net/ipv6/addrconf.c:3963 call_timer_fn+0x3b/0x2d0 kernel/time/timer.c:1450 expire_timers kernel/time/timer.c:1495 [inline] __run_timers+0x72a/0xa10 kernel/time/timer.c:1789 run_timer_softirq+0x69/0xf0 kernel/time/timer.c:1802 __do_softirq+0x268/0x5bb kernel/softirq.c:309 page last free stack trace: reset_page_owner include/linux/page_owner.h:28 [inline] free_pages_prepare mm/page_alloc.c:1349 [inline] free_pcp_prepare mm/page_alloc.c:1421 [inline] free_unref_page_prepare+0x2ae/0x2d0 mm/page_alloc.c:3336 free_unref_page mm/page_alloc.c:3391 [inline] free_the_page+0x9e/0x370 mm/page_alloc.c:5407 __free_pages+0x67/0xc0 mm/page_alloc.c:5418 __free_slab+0xcf/0x190 mm/slub.c:1894 free_slab mm/slub.c:1909 [inline] discard_slab mm/slub.c:1915 [inline] unfreeze_partials+0x15e/0x190 mm/slub.c:2410 put_cpu_partial+0xbf/0x180 mm/slub.c:2446 __slab_free+0x2c8/0x3a0 mm/slub.c:3095 do_slab_free mm/slub.c:3191 [inline] ___cache_free+0x111/0x130 mm/slub.c:3210 qlink_free+0x50/0x90 mm/kasan/quarantine.c:157 qlist_free_all+0x47/0xb0 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x15a/0x170 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x2f/0xe0 mm/kasan/common.c:440 kasan_slab_alloc include/linux/kasan.h:244 [inline] slab_post_alloc_hook+0x61/0x2f0 mm/slab.h:583 slab_alloc_node mm/slub.c:2947 [inline] slab_alloc mm/slub.c:2955 [inline] kmem_cache_alloc+0x168/0x2e0 mm/slub.c:2960 kmem_cache_alloc_node include/linux/slab.h:423 [inline] __alloc_skb+0x80/0x510 net/core/skbuff.c:200 alloc_skb include/linux/skbuff.h:1126 [inline] alloc_skb_with_frags+0xa1/0x570 net/core/skbuff.c:5951 Memory state around the buggy address: ffff88810c15ef00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88810c15ef80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88810c15f000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88810c15f080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88810c15f100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== F2FS-fs (loop0): access invalid blkaddr:748277810 CPU: 0 PID: 354 Comm: syz-executor.0 Tainted: G B 5.10.222-syzkaller-1003210-gfd58936f3c1f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118 dump_stack+0x15/0x17 lib/dump_stack.c:135 f2fs_is_valid_blkaddr+0xc87/0x1370 fs/f2fs/checkpoint.c:205 f2fs_truncate_data_blocks_range+0x659/0xeb0 fs/f2fs/file.c:599 f2fs_truncate_data_blocks+0xfa/0x140 fs/f2fs/file.c:638 truncate_dnode fs/f2fs/node.c:943 [inline] f2fs_truncate_inode_blocks+0x780/0x1200 fs/f2fs/node.c:1155 f2fs_do_truncate_blocks+0x753/0xb80 fs/f2fs/file.c:727 f2fs_truncate_blocks+0x114/0x310 fs/f2fs/file.c:755 f2fs_truncate+0x1b9/0x3c0 fs/f2fs/file.c:807 f2fs_setattr+0x9e3/0x10f0 fs/f2fs/file.c:971 notify_change+0xbb6/0xe60 fs/attr.c:410 do_truncate+0x1ed/0x2d0 fs/open.c:65 handle_truncate fs/namei.c:3054 [inline] do_open fs/namei.c:3395 [inline] path_openat+0x298d/0x3000 fs/namei.c:3509 do_filp_open+0x21c/0x460 fs/namei.c:3536 do_sys_openat2+0x13f/0x710 fs/open.c:1217 do_sys_open fs/open.c:1233 [inline] __do_sys_creat fs/open.c:1307 [inline] __se_sys_creat fs/open.c:1301 [inline] __x64_sys_creat+0x11f/0x160 fs/open.c:1301 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fe0d7ea4959 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fe0d7a270c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007fe0d7fc3f80 RCX: 00007fe0d7ea4959 RDX: 0000000000000000 RSI: 00000000000001f8 RDI: 00000000200000c0 RBP: 00007fe0d7f00c88 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fe0d7fc3f80 R15: 00007fffc2941c08 F2FS-fs (loop0): access invalid blkaddr:3131148598 CPU: 0 PID: 354 Comm: syz-executor.0 Tainted: G B 5.10.222-syzkaller-1003210-gfd58936f3c1f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118 dump_stack+0x15/0x17 lib/dump_stack.c:135 f2fs_is_valid_blkaddr+0xc87/0x1370 fs/f2fs/checkpoint.c:205 f2fs_truncate_data_blocks_range+0x659/0xeb0 fs/f2fs/file.c:599 f2fs_truncate_data_blocks+0xfa/0x140 fs/f2fs/file.c:638 truncate_dnode fs/f2fs/node.c:943 [inline] f2fs_truncate_inode_blocks+0x780/0x1200 fs/f2fs/node.c:1155 f2fs_do_truncate_blocks+0x753/0xb80 fs/f2fs/file.c:727 f2fs_truncate_blocks+0x114/0x310 fs/f2fs/file.c:755 f2fs_truncate+0x1b9/0x3c0 fs/f2fs/file.c:807 f2fs_setattr+0x9e3/0x10f0 fs/f2fs/file.c:971 notify_change+0xbb6/0xe60 fs/attr.c:410 do_truncate+0x1ed/0x2d0 fs/open.c:65 handle_truncate fs/namei.c:3054 [inline] do_open fs/namei.c:3395 [inline] path_openat+0x298d/0x3000 fs/namei.c:3509 do_filp_open+0x21c/0x460 fs/namei.c:3536 do_sys_openat2+0x13f/0x710 fs/open.c:1217 do_sys_open fs/open.c:1233 [inline] __do_sys_creat fs/open.c:1307 [inline] __se_sys_creat fs/open.c:1301 [inline] __x64_sys_creat+0x11f/0x160 fs/open.c:1301 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fe0d7ea4959 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fe0d7a270c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007fe0d7fc3f80 RCX: 00007fe0d7ea4959 RDX: 0000000000000000 RSI: 00000000000001f8 RDI: 00000000200000c0 RBP: 00007fe0d7f00c88 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fe0d7fc3f80 R15: 00007fffc2941c08 F2FS-fs (loop0): dec_valid_node_count: inconsistent i_blocks, ino:8, iblocks:0