loop3: detected capacity change from 0 to 1024 ================================================================== BUG: KASAN: slab-out-of-bounds in hfsplus_uni2asc+0x576/0x11f0 fs/hfsplus/unicode.c:179 Read of size 2 at addr ffff88807ba49a18 by task syz.3.77/4527 CPU: 0 PID: 4527 Comm: syz.3.77 Not tainted 5.15.169-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 print_address_description+0x63/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0x16b/0x1c0 mm/kasan/report.c:451 hfsplus_uni2asc+0x576/0x11f0 fs/hfsplus/unicode.c:179 hfsplus_listxattr+0x70a/0xf00 fs/hfsplus/xattr.c:736 vfs_listxattr fs/xattr.c:448 [inline] listxattr+0x282/0x2e0 fs/xattr.c:783 path_listxattr fs/xattr.c:807 [inline] __do_sys_listxattr fs/xattr.c:819 [inline] __se_sys_listxattr fs/xattr.c:816 [inline] __x64_sys_listxattr+0x172/0x230 fs/xattr.c:816 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f48e6c01719 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f48e5079038 EFLAGS: 00000246 ORIG_RAX: 00000000000000c2 RAX: ffffffffffffffda RBX: 00007f48e6db8f80 RCX: 00007f48e6c01719 RDX: 0000000000000300 RSI: 0000000000000000 RDI: 0000000020000340 RBP: 00007f48e6c7432e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f48e6db8f80 R15: 00007fff020b7e28 Allocated by task 4527: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc+0xba/0xf0 mm/kasan/common.c:513 kasan_kmalloc include/linux/kasan.h:264 [inline] __kmalloc+0x168/0x300 mm/slub.c:4407 kmalloc include/linux/slab.h:596 [inline] hfsplus_find_init+0x81/0x1c0 fs/hfsplus/bfind.c:21 hfsplus_listxattr+0x3bd/0xf00 fs/hfsplus/xattr.c:696 vfs_listxattr fs/xattr.c:448 [inline] listxattr+0x282/0x2e0 fs/xattr.c:783 path_listxattr fs/xattr.c:807 [inline] __do_sys_listxattr fs/xattr.c:819 [inline] __se_sys_listxattr fs/xattr.c:816 [inline] __x64_sys_listxattr+0x172/0x230 fs/xattr.c:816 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff88807ba49800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 536 bytes inside of 1024-byte region [ffff88807ba49800, ffff88807ba49c00) The buggy address belongs to the page: page:ffffea0001ee9200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7ba48 head:ffffea0001ee9200 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 0000000e00000001 ffff888017041dc0 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4173, ts 56623190520, free_ts 56461821942 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x322a/0x33c0 mm/page_alloc.c:4159 __alloc_pages+0x272/0x700 mm/page_alloc.c:5423 alloc_slab_page mm/slub.c:1775 [inline] allocate_slab mm/slub.c:1912 [inline] new_slab+0xbb/0x4b0 mm/slub.c:1975 ___slab_alloc+0x6f6/0xe10 mm/slub.c:3008 __slab_alloc mm/slub.c:3095 [inline] slab_alloc_node mm/slub.c:3186 [inline] __kmalloc_node_track_caller+0x1f6/0x390 mm/slub.c:4958 kmalloc_reserve net/core/skbuff.c:356 [inline] __alloc_skb+0x12c/0x590 net/core/skbuff.c:427 alloc_skb include/linux/skbuff.h:1162 [inline] nlmsg_new include/net/netlink.h:953 [inline] rtmsg_fib+0x140/0x620 net/ipv4/fib_semantics.c:520 fib_table_insert+0xfc0/0x1f90 net/ipv4/fib_trie.c:1398 fib_magic net/ipv4/fib_frontend.c:1092 [inline] fib_add_ifaddr+0xc24/0x1730 net/ipv4/fib_frontend.c:1129 fib_netdev_event+0x61d/0x760 net/ipv4/fib_frontend.c:1474 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391 __dev_notify_flags+0x304/0x610 dev_change_flags+0xe7/0x190 net/core/dev.c:8893 do_setlink+0xc21/0x3d80 net/core/rtnetlink.c:2776 __rtnl_newlink net/core/rtnetlink.c:3447 [inline] rtnl_newlink+0x17d6/0x2070 net/core/rtnetlink.c:3569 rtnetlink_rcv_msg+0x993/0xee0 net/core/rtnetlink.c:5647 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0xc34/0xcf0 mm/page_alloc.c:3317 free_unref_page+0x95/0x2d0 mm/page_alloc.c:3396 free_slab mm/slub.c:2015 [inline] discard_slab mm/slub.c:2021 [inline] __unfreeze_partials+0x1b7/0x210 mm/slub.c:2507 put_cpu_partial+0x132/0x1a0 mm/slub.c:2587 do_slab_free mm/slub.c:3487 [inline] ___cache_free+0xe3/0x100 mm/slub.c:3506 qlist_free_all+0x36/0x90 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x162/0x180 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x2f/0xc0 mm/kasan/common.c:444 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook+0x53/0x380 mm/slab.h:519 slab_alloc_node mm/slub.c:3220 [inline] kmem_cache_alloc_node+0x121/0x2c0 mm/slub.c:3256 __alloc_skb+0xdd/0x590 net/core/skbuff.c:415 alloc_skb include/linux/skbuff.h:1162 [inline] alloc_skb_with_frags+0xa3/0x780 net/core/skbuff.c:6170 sock_alloc_send_pskb+0x915/0xa50 net/core/sock.c:2530 unix_dgram_sendmsg+0x6fd/0x2090 net/unix/af_unix.c:1798 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] __sys_sendto+0x564/0x720 net/socket.c:2063 __do_sys_sendto net/socket.c:2075 [inline] __se_sys_sendto net/socket.c:2071 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:2071 Memory state around the buggy address: ffff88807ba49900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807ba49980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88807ba49a00: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88807ba49a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807ba49b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================