================================================================== BUG: KASAN: slab-out-of-bounds in dns_resolver_preparse+0xa98/0xaf8 net/dns_resolver/dns_key.c:127 Read of size 1 at addr ffff0000cdac2b04 by task syz-executor.3/15877 CPU: 0 PID: 15877 Comm: syz-executor.3 Not tainted 6.1.71-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x174/0x4c0 mm/kasan/report.c:395 kasan_report+0xd4/0x130 mm/kasan/report.c:495 __asan_report_load1_noabort+0x2c/0x38 mm/kasan/report_generic.c:348 dns_resolver_preparse+0xa98/0xaf8 net/dns_resolver/dns_key.c:127 key_create_or_update+0x43c/0xa38 security/keys/key.c:861 __do_sys_add_key security/keys/keyctl.c:134 [inline] __se_sys_add_key security/keys/keyctl.c:74 [inline] __arm64_sys_add_key+0x418/0x550 security/keys/keyctl.c:74 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 Allocated by task 15877: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:52 kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:505 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:955 [inline] __kmalloc_node+0xe0/0x1d0 mm/slab_common.c:962 kmalloc_node include/linux/slab.h:579 [inline] kvmalloc_node+0x84/0x1e4 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 security/keys/keyctl.c:74 [inline] __arm64_sys_add_key+0x29c/0x550 security/keys/keyctl.c:74 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 The buggy address belongs to the object at ffff0000cdac2b00 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 4 bytes inside of 128-byte region [ffff0000cdac2b00, ffff0000cdac2b80) The buggy address belongs to the physical page: page:0000000031745411 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10dac2 flags: 0x5ffc00000000200(slab|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000000200 fffffc00039dde80 dead000000000002 ffff0000c0002300 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000cdac2a00: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc ffff0000cdac2a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff0000cdac2b00: 04 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff0000cdac2b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000cdac2c00: 00 03 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================