RBP: 00007f4f1f7be1d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 00007ffcc9f84d6f R14: 00007f4f1f7be300 R15: 0000000000022000 ================================================================== BUG: KASAN: slab-out-of-bounds in dns_resolver_preparse+0x910/0x9b0 net/dns_resolver/dns_key.c:127 Read of size 1 at addr ffff888049254874 by task syz-executor.2/20259 CPU: 1 PID: 20259 Comm: syz-executor.2 Not tainted 5.10.206 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x107/0x167 lib/dump_stack.c:118 print_address_description.constprop.0+0x1c/0x220 mm/kasan/report.c:377 __kasan_report mm/kasan/report.c:537 [inline] kasan_report.cold+0x37/0x7c mm/kasan/report.c:554 dns_resolver_preparse+0x910/0x9b0 net/dns_resolver/dns_key.c:127 key_create_or_update+0x3e0/0xc30 security/keys/key.c:859 __do_sys_add_key+0x215/0x430 security/keys/keyctl.c:134 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x62/0xc7 RIP: 0033:0x7fb84bb25b19 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fb84909b188 EFLAGS: 00000246 ORIG_RAX: 00000000000000f8 RAX: ffffffffffffffda RBX: 00007fb84bc38f60 RCX: 00007fb84bb25b19 RDX: 0000000020000000 RSI: 0000000000000000 RDI: 0000000020000200 RBP: 00007fb84bb7ff6d R08: fffffffffffffffb R09: 0000000000000000 R10: 0000000000000004 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffedf9222bf R14: 00007fb84909b300 R15: 0000000000022000 Allocated by task 20259: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc9/0xd0 mm/kasan/common.c:461 kmalloc_node include/linux/slab.h:575 [inline] kvmalloc_node+0x119/0x170 mm/util.c:607 kvmalloc include/linux/mm.h:765 [inline] __do_sys_add_key+0x311/0x430 security/keys/keyctl.c:116 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x62/0xc7 The buggy address belongs to the object at ffff888049254870 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 4 bytes inside of 8-byte region [ffff888049254870, ffff888049254878) The buggy address belongs to the page: page:000000006456b592 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x49254 flags: 0x100000000000200(slab) raw: 0100000000000200 ffffea00002566c0 0000000500000005 ffff888008041c80 raw: 0000000000000000 0000000080660066 00000001ffffffff ffff88801e4e5801 page dumped because: kasan: bad access detected page->mem_cgroup:ffff88801e4e5801 Memory state around the buggy address: ffff888049254700: fc 00 fc fc fc fc 00 fc fc fc fc 00 fc fc fc fc ffff888049254780: 00 fc fc fc fc 00 fc fc fc fc fb fc fc fc fc fb >ffff888049254800: fc fc fc fc 00 fc fc fc fc 04 fc fc fc fc 04 fc ^ ffff888049254880: fc fc fc 00 fc fc fc fc fa fc fc fc fc fa fc fc ffff888049254900: fc fc 00 fc fc fc fc 04 fc fc fc fc fb fc fc fc ================================================================== netlink: 12 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.3'. FAULT_INJECTION: forcing a failure. name fail_usercopy, interval 1, probability 0, space 0, times 0 CPU: 0 PID: 20281 Comm: syz-executor.1 Tainted: G B 5.10.206 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x107/0x167 lib/dump_stack.c:118 fail_dump lib/fault-inject.c:52 [inline] should_fail.cold+0x5/0xa lib/fault-inject.c:146 _copy_to_user+0x2e/0x180 lib/usercopy.c:36 copy_to_user include/linux/uaccess.h:200 [inline] simple_read_from_buffer+0xcc/0x160 fs/libfs.c:729 proc_fail_nth_read+0x198/0x230 fs/proc/base.c:1423 vfs_read+0x228/0x580 fs/read_write.c:494 ksys_read+0x12d/0x260 fs/read_write.c:634 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x62/0xc7 RIP: 0033:0x7f4f221fb69c Code: ec 28 48 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 f9 fc ff ff 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 31 c0 0f 05 <48> 3d 00 f0 ff ff 77 34 44 89 c7 48 89 44 24 08 e8 2f fd ff ff 48 RSP: 002b:00007f4f1f7be170 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 000000000000001c RCX: 00007f4f221fb69c RDX: 000000000000000f RSI: 00007f4f1f7be1e0 RDI: 0000000000000005 RBP: 00007f4f1f7be1d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 00007ffcc9f84d6f R14: 00007f4f1f7be300 R15: 0000000000022000