================================================================== 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 ffff88804d15be14 by task syz-executor.7/15885 CPU: 1 PID: 15885 Comm: syz-executor.7 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:0x7f785d1e5b19 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:00007f785a73a188 EFLAGS: 00000246 ORIG_RAX: 00000000000000f8 RAX: ffffffffffffffda RBX: 00007f785d2f9020 RCX: 00007f785d1e5b19 RDX: 0000000020000000 RSI: 0000000000000000 RDI: 0000000020000200 RBP: 00007f785d23ff6d R08: fffffffffffffffb R09: 0000000000000000 R10: 0000000000000004 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff20a3929f R14: 00007f785a73a300 R15: 0000000000022000 Allocated by task 15885: 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 ffff88804d15be10 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 4 bytes inside of 8-byte region [ffff88804d15be10, ffff88804d15be18) The buggy address belongs to the page: page:0000000073c581dd refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4d15b flags: 0x100000000000200(slab) raw: 0100000000000200 dead000000000100 dead000000000122 ffff888008041c80 raw: 0000000000000000 0000000080660066 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88804d15bd00: fc fc fc fc fa fc fc fc fc 04 fc fc fc fc fa fc ffff88804d15bd80: fc fc fc fa fc fc fc fc fa fc fc fc fc fa fc fc >ffff88804d15be00: fc fc 04 fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88804d15be80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88804d15bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== FAT-fs (loop3): unable to read boot sector FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 0 PID: 15937 Comm: syz-executor.3 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 should_failslab+0x5/0x20 mm/slab_common.c:1193 slab_pre_alloc_hook mm/slab.h:515 [inline] slab_alloc_node mm/slub.c:2821 [inline] slab_alloc mm/slub.c:2904 [inline] kmem_cache_alloc_trace+0x55/0x320 mm/slub.c:2921 kmalloc include/linux/slab.h:552 [inline] __memcg_init_list_lru_node+0x7f/0x1e0 mm/list_lru.c:339 memcg_init_list_lru_node mm/list_lru.c:362 [inline] memcg_init_list_lru mm/list_lru.c:448 [inline] __list_lru_init+0x44d/0x890 mm/list_lru.c:615 alloc_super+0x8b8/0xa90 fs/super.c:272 sget+0x110/0x510 fs/super.c:614 mount_bdev+0xf8/0x400 fs/super.c:1402 legacy_get_tree+0x105/0x220 fs/fs_context.c:593 vfs_get_tree+0x8e/0x300 fs/super.c:1559 do_new_mount fs/namespace.c:2899 [inline] path_mount+0x13be/0x20b0 fs/namespace.c:3229 do_mount fs/namespace.c:3242 [inline] __do_sys_mount fs/namespace.c:3450 [inline] __se_sys_mount fs/namespace.c:3427 [inline] __x64_sys_mount+0x282/0x300 fs/namespace.c:3427 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x62/0xc7 RIP: 0033:0x7f5222275b19 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:00007f521f7eb188 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f5222388f60 RCX: 00007f5222275b19 RDX: 00000000200000c0 RSI: 0000000020000080 RDI: 0000000020000200 RBP: 00007f521f7eb1d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 00007ffc0e33a45f R14: 00007f521f7eb300 R15: 0000000000022000