================================================================== BUG: KASAN: slab-out-of-bounds in dns_resolver_preparse+0xcaf/0xd20 net/dns_resolver/dns_key.c:127 Read of size 1 at addr ffff8880124ccf2c by task syz-executor.0/3973 CPU: 1 PID: 3973 Comm: syz-executor.0 Not tainted 6.1.70-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15f/0x4f0 mm/kasan/report.c:395 kasan_report+0x136/0x160 mm/kasan/report.c:495 dns_resolver_preparse+0xcaf/0xd20 net/dns_resolver/dns_key.c:127 key_create_or_update+0x47b/0xbf0 security/keys/key.c:861 __do_sys_add_key security/keys/keyctl.c:134 [inline] __se_sys_add_key+0x33b/0x480 security/keys/keyctl.c:74 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f25c007cce9 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:00007f25c0d490c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000f8 RAX: ffffffffffffffda RBX: 00007f25c019bf80 RCX: 00007f25c007cce9 RDX: 0000000020000080 RSI: 0000000000000000 RDI: 00000000200003c0 RBP: 00007f25c00c947a R08: 000000002e646b3a R09: 0000000000000000 R10: 0000000000000004 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f25c019bf80 R15: 00007ffea1064608 Allocated by task 3973: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x97/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:955 [inline] __kmalloc_node+0xb3/0x230 mm/slab_common.c:962 kmalloc_node include/linux/slab.h:579 [inline] kvmalloc_node+0x6e/0x180 mm/util.c:581 kvmalloc include/linux/slab.h:706 [inline] __do_sys_add_key security/keys/keyctl.c:116 [inline] __se_sys_add_key+0x26c/0x480 security/keys/keyctl.c:74 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff8880124ccf28 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 4 bytes inside of 8-byte region [ffff8880124ccf28, ffff8880124ccf30) The buggy address belongs to the physical page: page:ffffea0000493300 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x124cc flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea00004d0080 dead000000000002 ffff888012441280 raw: 0000000000000000 0000000080660066 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 0x0(), pid 1, tgid 1 (swapper/0), ts 2513157823, free_ts 0 create_dummy_stack mm/page_owner.c:67 [inline] register_early_stack+0x86/0xe0 mm/page_owner.c:83 init_page_owner+0x3a/0x9be mm/page_owner.c:93 invoke_init_callbacks mm/page_ext.c:126 [inline] page_ext_init+0x4c1/0x51c mm/page_ext.c:518 kernel_init_freeable+0x450/0x60f init/main.c:1622 page_owner free stack trace missing Memory state around the buggy address: ffff8880124cce00: fc fc fb fc fc fc fc fb fc fc fc fc fb fc fc fc ffff8880124cce80: fc fb fc fc fc fc fb fc fc fc fc fb fc fc fc fc >ffff8880124ccf00: fb fc fc fc fc 04 fc fc fc fc 05 fc fc fc fc fa ^ ffff8880124ccf80: fc fc fc fc fa fc fc fc fc fa fc fc fc fc fc fc ffff8880124cd000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================