================================================================== 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 ffff8880148382ac by task syz-executor.7/8639 CPU: 1 PID: 8639 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:0x7f1f0a022b19 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:00007f1f07598188 EFLAGS: 00000246 ORIG_RAX: 00000000000000f8 RAX: ffffffffffffffda RBX: 00007f1f0a135f60 RCX: 00007f1f0a022b19 RDX: 0000000020000000 RSI: 0000000000000000 RDI: 0000000020000200 RBP: 00007f1f0a07cf6d R08: fffffffffffffffb R09: 0000000000000000 R10: 0000000000000004 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffed827f73f R14: 00007f1f07598300 R15: 0000000000022000 Allocated by task 8639: 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 ffff8880148382a8 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 4 bytes inside of 8-byte region [ffff8880148382a8, ffff8880148382b0) The buggy address belongs to the page: page:000000000efc3218 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880148384d8 pfn:0x14838 flags: 0x100000000000200(slab) raw: 0100000000000200 ffffea00006bdf40 0000000400000004 ffff888008041c80 raw: ffff8880148384d8 0000000080660063 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888014838180: fc fc fb fc fc fc fc fa fc fc fc fc 06 fc fc fc ffff888014838200: fc fa fc fc fc fc 04 fc fc fc fc fa fc fc fc fc >ffff888014838280: 06 fc fc fc fc 04 fc fc fc fc fb fc fc fc fc 07 ^ ffff888014838300: fc fc fc fc 06 fc fc fc fc 00 fc fc fc fc 00 fc ffff888014838380: fc fc fc 04 fc fc fc fc fa fc fc fc fc fa fc fc ================================================================== FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 1 PID: 8649 Comm: syz-executor.6 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+0x5b/0x310 mm/slub.c:2909 mem_pool_alloc mm/kmemleak.c:423 [inline] create_object.isra.0+0x3a/0xa20 mm/kmemleak.c:578 kmemleak_alloc_recursive include/linux/kmemleak.h:43 [inline] slab_post_alloc_hook mm/slab.h:534 [inline] slab_alloc_node mm/slub.c:2896 [inline] __kmalloc_node_track_caller+0x1a6/0x3b0 mm/slub.c:4496 __kmalloc_reserve net/core/skbuff.c:142 [inline] __alloc_skb+0xb1/0x5b0 net/core/skbuff.c:210 alloc_skb include/linux/skbuff.h:1102 [inline] alloc_skb_with_frags+0x92/0x570 net/core/skbuff.c:5907 sock_alloc_send_pskb+0x7af/0x930 net/core/sock.c:2363 __ip6_append_data.isra.0+0x1c12/0x3a70 net/ipv6/ip6_output.c:1667 ip6_make_skb+0x2de/0x4e0 net/ipv6/ip6_output.c:2034 udpv6_sendmsg+0x20d0/0x2af0 net/ipv6/udp.c:1550 inet6_sendmsg+0x105/0x140 net/ipv6/af_inet6.c:651 sock_sendmsg_nosec net/socket.c:651 [inline] __sock_sendmsg+0xf2/0x190 net/socket.c:663 ____sys_sendmsg+0x334/0x870 net/socket.c:2376 ___sys_sendmsg+0xf3/0x170 net/socket.c:2430 __sys_sendmmsg+0x195/0x470 net/socket.c:2516 __do_sys_sendmmsg net/socket.c:2545 [inline] __se_sys_sendmmsg net/socket.c:2542 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2542 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x62/0xc7 RIP: 0033:0x7f1226a48b19 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:00007f1223fbe188 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 00007f1226b5bf60 RCX: 00007f1226a48b19 RDX: 0400000000000070 RSI: 0000000020004d00 RDI: 0000000000000003 RBP: 00007f1223fbe1d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffc3b74d18f R14: 00007f1223fbe300 R15: 0000000000022000