xt_physdev: --physdev-out and --physdev-is-out only supported in the FORWARD and POSTROUTING chains with bridged traffic ================================================================== BUG: KASAN: use-after-free in dtMoveEntry fs/jfs/jfs_dtree.c:3931 [inline] BUG: KASAN: use-after-free in dtSplitPage+0x1cc3/0x36a0 fs/jfs/jfs_dtree.c:1558 Write of size 1 at addr ffff88801fdf1000 by task syz.0.0/5326 CPU: 0 UID: 0 PID: 5326 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description+0x55/0x1e0 mm/kasan/report.c:378 print_report+0x58/0x70 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 dtMoveEntry fs/jfs/jfs_dtree.c:3931 [inline] dtSplitPage+0x1cc3/0x36a0 fs/jfs/jfs_dtree.c:1558 dtSplitUp fs/jfs/jfs_dtree.c:1089 [inline] dtInsert+0x1081/0x5cd0 fs/jfs/jfs_dtree.c:868 jfs_create+0x75b/0xb10 fs/jfs/namei.c:138 lookup_open fs/namei.c:4511 [inline] open_last_lookups fs/namei.c:4611 [inline] path_openat+0x1395/0x3860 fs/namei.c:4855 do_file_open+0x23e/0x4a0 fs/namei.c:4887 do_sys_openat2+0x113/0x200 fs/open.c:1364 do_sys_open fs/open.c:1370 [inline] __do_sys_creat fs/open.c:1448 [inline] __se_sys_creat fs/open.c:1442 [inline] __x64_sys_creat+0x8f/0xc0 fs/open.c:1442 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f0075f9cdd9 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f0076f11fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007f0076216090 RCX: 00007f0075f9cdd9 RDX: 0000000000000000 RSI: 0000000000000010 RDI: 0000200000000100 RBP: 00007f0076032d69 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f0076216128 R14: 00007f0076216090 R15: 00007ffc74d86af8 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x2d pfn:0x1fdf1 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f0(buddy) raw: 00fff00000000000 ffffea00007f7bc8 ffffea00004ac348 0000000000000000 raw: 000000000000002d 0000000000000000 00000000f0000000 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Unmovable, gfp_mask 0x152c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5281, tgid 5281 (udevd), ts 102935782177, free_ts 102967957406 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x231/0x280 mm/page_alloc.c:1858 prep_new_page mm/page_alloc.c:1866 [inline] get_page_from_freelist+0x24ba/0x2540 mm/page_alloc.c:3946 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5226 alloc_pages_mpol+0x235/0x490 mm/mempolicy.c:2490 alloc_frozen_pages_noprof mm/mempolicy.c:2561 [inline] alloc_pages_noprof+0xac/0x2a0 mm/mempolicy.c:2581 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2591 filemap_alloc_folio_noprof+0x111/0x470 mm/filemap.c:1014 ractl_alloc_folio mm/readahead.c:189 [inline] page_cache_ra_unbounded+0x393/0xa10 mm/readahead.c:277 do_page_cache_ra mm/readahead.c:334 [inline] force_page_cache_ra+0x26e/0x2e0 mm/readahead.c:364 filemap_get_pages+0x4c0/0x1ef0 mm/filemap.c:2696 filemap_read+0x447/0x1230 mm/filemap.c:2806 blkdev_read_iter+0x30a/0x440 block/fops.c:855 new_sync_read fs/read_write.c:493 [inline] vfs_read+0x582/0xa70 fs/read_write.c:574 ksys_read+0x150/0x270 fs/read_write.c:717 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 69 tgid 69 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1402 [inline] free_unref_folios+0xcec/0x1480 mm/page_alloc.c:3004 shrink_folio_list+0x2a26/0x52a0 mm/vmscan.c:1516 evict_folios+0x4998/0x5ac0 mm/vmscan.c:4854 try_to_shrink_lruvec+0xbca/0x1050 mm/vmscan.c:5009 shrink_one+0x25c/0x710 mm/vmscan.c:5069 shrink_many mm/vmscan.c:5132 [inline] lru_gen_shrink_node mm/vmscan.c:5210 [inline] shrink_node+0x31bf/0x3ae0 mm/vmscan.c:6198 kswapd_shrink_node mm/vmscan.c:7052 [inline] balance_pgdat mm/vmscan.c:7228 [inline] kswapd+0x1736/0x2de0 mm/vmscan.c:7501 kthread+0x388/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff88801fdf0f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88801fdf0f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88801fdf1000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88801fdf1080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88801fdf1100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================