================================================================== 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 ffff88800e4334b4 by task syz-executor.3/6273 CPU: 1 PID: 6273 Comm: syz-executor.3 Not tainted 5.10.207 #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:0x7fc0ea6e6b19 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:00007fc0e7c5c188 EFLAGS: 00000246 ORIG_RAX: 00000000000000f8 RAX: ffffffffffffffda RBX: 00007fc0ea7f9f60 RCX: 00007fc0ea6e6b19 RDX: 0000000020000000 RSI: 0000000000000000 RDI: 0000000020000200 RBP: 00007fc0ea740f6d R08: fffffffffffffffb R09: 0000000000000000 R10: 0000000000000004 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe60b9325f R14: 00007fc0e7c5c300 R15: 0000000000022000 Allocated by task 6273: 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 ffff88800e4334b0 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 4 bytes inside of 8-byte region [ffff88800e4334b0, ffff88800e4334b8) The buggy address belongs to the page: page:00000000f3d15697 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88800e433f28 pfn:0xe433 flags: 0x100000000000200(slab) raw: 0100000000000200 ffffea00006cda80 0000001600000016 ffff888008041c80 raw: ffff88800e433f28 0000000080660056 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88800e433380: fc fc fc fa fc fc fc fc fb fc fc fc fc fb fc fc ffff88800e433400: fc fc fa fc fc fc fc fa fc fc fc fc fb fc fc fc >ffff88800e433480: fc fa fc fc fc fc 04 fc fc fc fc fb fc fc fc fc ^ ffff88800e433500: fa fc fc fc fc fa fc fc fc fc fb fc fc fc fc fb ffff88800e433580: fc fc fc fc fa fc fc fc fc fb fc fc fc fc fa fc ================================================================== EXT4-fs warning (device sda): verify_group_input:146: Cannot add at group 4063232 (only 16 groups) EXT4-fs warning (device sda): verify_group_input:146: Cannot add at group 4063232 (only 16 groups) EXT4-fs warning (device sda): verify_group_input:146: Cannot add at group 4063232 (only 16 groups) EXT4-fs warning (device sda): verify_group_input:146: Cannot add at group 4063232 (only 16 groups) EXT4-fs warning (device sda): verify_group_input:146: Cannot add at group 4063232 (only 16 groups) audit: type=1326 audit(1705164912.179:56): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=6356 comm="syz-executor.5" exe="/syz-executor.5" sig=9 arch=c000003e syscall=231 compat=0 ip=0x7efcaf0feb19 code=0x0 EXT4-fs warning (device sda): verify_group_input:146: Cannot add at group 4063232 (only 16 groups) EXT4-fs warning (device sda): verify_group_input:146: Cannot add at group 4063232 (only 16 groups) audit: type=1326 audit(1705164913.008:57): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=6356 comm="syz-executor.5" exe="/syz-executor.5" sig=9 arch=c000003e syscall=231 compat=0 ip=0x7efcaf0feb19 code=0x0 audit: type=1326 audit(1705164913.180:58): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=6414 comm="syz-executor.5" exe="/syz-executor.5" sig=9 arch=c000003e syscall=231 compat=0 ip=0x7efcaf0feb19 code=0x0 audit: type=1326 audit(1705164913.421:59): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=6424 comm="syz-executor.3" exe="/syz-executor.3" sig=9 arch=c000003e syscall=231 compat=0 ip=0x7fc0ea6e6b19 code=0x0 audit: type=1326 audit(1705164913.979:60): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=6430 comm="syz-executor.1" exe="/syz-executor.1" sig=9 arch=c000003e syscall=231 compat=0 ip=0x7f4cb15e2b19 code=0x0 audit: type=1326 audit(1705164914.817:61): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=6436 comm="syz-executor.0" exe="/syz-executor.0" sig=9 arch=c000003e syscall=231 compat=0 ip=0x7f1282573b19 code=0x0 audit: type=1326 audit(1705164914.854:62): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=6448 comm="syz-executor.3" exe="/syz-executor.3" sig=9 arch=c000003e syscall=231 compat=0 ip=0x7fc0ea6e6b19 code=0x0 audit: type=1326 audit(1705164914.857:63): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=6444 comm="syz-executor.5" exe="/syz-executor.5" sig=9 arch=c000003e syscall=231 compat=0 ip=0x7efcaf0feb19 code=0x0 audit: type=1326 audit(1705164914.859:64): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=6452 comm="syz-executor.1" exe="/syz-executor.1" sig=9 arch=c000003e syscall=231 compat=0 ip=0x7f4cb15e2b19 code=0x0 kauditd_printk_skb: 3 callbacks suppressed audit: type=1326 audit(1705164916.689:68): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=6502 comm="syz-executor.3" exe="/syz-executor.3" sig=9 arch=c000003e syscall=231 compat=0 ip=0x7fc0ea6e6b19 code=0x0 audit: type=1326 audit(1705164916.690:69): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=6506 comm="syz-executor.6" exe="/syz-executor.6" sig=9 arch=c000003e syscall=231 compat=0 ip=0x7f58f043ab19 code=0x0 audit: type=1326 audit(1705164916.690:70): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=6508 comm="syz-executor.5" exe="/syz-executor.5" sig=9 arch=c000003e syscall=231 compat=0 ip=0x7efcaf0feb19 code=0x0 audit: type=1326 audit(1705164916.711:71): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=6511 comm="syz-executor.0" exe="/syz-executor.0" sig=9 arch=c000003e syscall=231 compat=0 ip=0x7f1282573b19 code=0x0 EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue netlink: 20 bytes leftover after parsing attributes in process `syz-executor.0'. netlink: 20 bytes leftover after parsing attributes in process `syz-executor.0'. audit: type=1326 audit(1705164917.656:72): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=6550 comm="syz-executor.6" exe="/syz-executor.6" sig=9 arch=c000003e syscall=231 compat=0 ip=0x7f58f043ab19 code=0x0 tmpfs: Bad value for 'mpol' tmpfs: Bad value for 'mpol' EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue tmpfs: Bad value for 'mpol' tmpfs: Bad value for 'mpol' EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue tmpfs: Bad value for 'mpol' tmpfs: Bad value for 'mpol' tmpfs: Bad value for 'mpol' tmpfs: Bad value for 'mpol' audit: type=1400 audit(1705164919.584:73): avc: denied { watch_reads } for pid=6650 comm="syz-executor.6" path="/syzkaller-testdir275319961/syzkaller.YTQ5Vn/99" dev="sda" ino=16028 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=dir permissive=1