================================================================== BUG: KASAN: slab-out-of-bounds in copy_page_from_iter_atomic+0x905/0x1180 lib/iov_iter.c:821 Read of size 2048 at addr ffff8880823fc400 by task kworker/u4:2/41 CPU: 0 PID: 41 Comm: kworker/u4:2 Not tainted 6.2.0-rc3-syzkaller-00060-gc757fc92a3f7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Workqueue: loop0 loop_workfn Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 print_address_description+0x74/0x340 mm/kasan/report.c:306 print_report+0x107/0x220 mm/kasan/report.c:417 kasan_report+0x139/0x170 mm/kasan/report.c:517 kasan_check_range+0x2a7/0x2e0 mm/kasan/generic.c:189 memcpy+0x25/0x60 mm/kasan/shadow.c:65 copy_page_from_iter_atomic+0x905/0x1180 lib/iov_iter.c:821 generic_perform_write+0x384/0x610 mm/filemap.c:3780 __generic_file_write_iter+0x176/0x400 mm/filemap.c:3900 generic_file_write_iter+0xab/0x310 mm/filemap.c:3932 do_iter_write+0x6f0/0xc50 fs/read_write.c:861 lo_write_bvec drivers/block/loop.c:249 [inline] lo_write_simple drivers/block/loop.c:271 [inline] do_req_filebacked drivers/block/loop.c:495 [inline] loop_handle_cmd drivers/block/loop.c:1873 [inline] loop_process_work+0x14bf/0x2330 drivers/block/loop.c:1908 process_one_work+0x81c/0xd10 kernel/workqueue.c:2289 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436 kthread+0x266/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Allocated by task 9140: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:371 [inline] __kasan_kmalloc+0x97/0xb0 mm/kasan/common.c:380 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:968 [inline] __kmalloc+0xaf/0x190 mm/slab_common.c:981 kmalloc include/linux/slab.h:584 [inline] hfsplus_read_wrapper+0x4a1/0x1370 fs/hfsplus/wrapper.c:178 hfsplus_fill_super+0x38a/0x1c60 fs/hfsplus/super.c:413 mount_bdev+0x26c/0x3a0 fs/super.c:1359 legacy_get_tree+0xea/0x180 fs/fs_context.c:610 vfs_get_tree+0x88/0x270 fs/super.c:1489 do_new_mount+0x289/0xad0 fs/namespace.c:3145 do_mount fs/namespace.c:3488 [inline] __do_sys_mount fs/namespace.c:3697 [inline] __se_sys_mount+0x2e3/0x3d0 fs/namespace.c:3674 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff8880823fc400 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes inside of 512-byte region [ffff8880823fc400, ffff8880823fc600) The buggy address belongs to the physical page: page:ffffea000208ff00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x823fc head:ffffea000208ff00 order:2 compound_mapcount:0 subpages_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffff888012841c80 ffffea00009ffb00 dead000000000002 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0x52a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5095, tgid 5095 (syz-executor.3), ts 230026853710, free_ts 230008044462 prep_new_page mm/page_alloc.c:2531 [inline] get_page_from_freelist+0x72b/0x7a0 mm/page_alloc.c:4283 __alloc_pages+0x259/0x560 mm/page_alloc.c:5549 alloc_slab_page+0xbd/0x190 mm/slub.c:1851 allocate_slab+0x5e/0x3c0 mm/slub.c:1998 new_slab mm/slub.c:2051 [inline] ___slab_alloc+0x7f4/0xeb0 mm/slub.c:3193 __slab_alloc mm/slub.c:3292 [inline] __slab_alloc_node mm/slub.c:3345 [inline] slab_alloc_node mm/slub.c:3442 [inline] __kmem_cache_alloc_node+0x25b/0x340 mm/slub.c:3491 __do_kmalloc_node mm/slab_common.c:967 [inline] __kmalloc+0x9e/0x190 mm/slab_common.c:981 kmalloc include/linux/slab.h:584 [inline] switchdev_deferred_enqueue+0x44/0x260 net/switchdev/switchdev.c:88 switchdev_port_attr_set_defer net/switchdev/switchdev.c:154 [inline] switchdev_port_attr_set+0xf3/0x310 net/switchdev/switchdev.c:173 __set_ageing_time+0x14f/0x210 net/bridge/br_stp.c:614 br_init_port+0x136/0x200 net/bridge/br_stp_if.c:43 new_nbp+0x307/0x430 net/bridge/br_if.c:441 br_add_if+0x29a/0xed0 net/bridge/br_if.c:598 do_set_master net/core/rtnetlink.c:2617 [inline] do_setlink+0xd63/0x3f10 net/core/rtnetlink.c:2820 __rtnl_newlink net/core/rtnetlink.c:3590 [inline] rtnl_newlink+0x1856/0x20a0 net/core/rtnetlink.c:3637 rtnetlink_rcv_msg+0x7ca/0xec0 net/core/rtnetlink.c:6141 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+0x751/0x780 mm/page_alloc.c:1496 free_unref_page_prepare mm/page_alloc.c:3369 [inline] free_unref_page+0x19/0x4c0 mm/page_alloc.c:3464 __stack_depot_save+0x430/0x4a0 lib/stackdepot.c:506 kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x61/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:518 ____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1781 [inline] slab_free_freelist_hook+0x12e/0x1a0 mm/slub.c:1807 slab_free mm/slub.c:3787 [inline] kmem_cache_free+0x94/0x1d0 mm/slub.c:3809 netlink_broadcast+0x1057/0x1170 net/netlink/af_netlink.c:1529 nlmsg_multicast include/net/netlink.h:1082 [inline] nlmsg_notify+0xfa/0x1c0 net/netlink/af_netlink.c:2607 rtnl_notify net/core/rtnetlink.c:768 [inline] rtmsg_ifinfo_send net/core/rtnetlink.c:3973 [inline] rtmsg_ifinfo_event net/core/rtnetlink.c:3989 [inline] rtnetlink_event+0x155/0x1b0 net/core/rtnetlink.c:6192 notifier_call_chain kernel/notifier.c:87 [inline] raw_notifier_call_chain+0xe7/0x170 kernel/notifier.c:455 call_netdevice_notifiers_info net/core/dev.c:1944 [inline] call_netdevice_notifiers_extack net/core/dev.c:1982 [inline] call_netdevice_notifiers+0x14e/0x1d0 net/core/dev.c:1996 br_add_if+0xc6a/0xed0 net/bridge/br_if.c:692 do_set_master net/core/rtnetlink.c:2617 [inline] do_setlink+0xd63/0x3f10 net/core/rtnetlink.c:2820 __rtnl_newlink net/core/rtnetlink.c:3590 [inline] rtnl_newlink+0x1856/0x20a0 net/core/rtnetlink.c:3637 Memory state around the buggy address: ffff8880823fc500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880823fc580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880823fc600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880823fc680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880823fc700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================