syzbot


KASAN: slab-out-of-bounds Read in dns_resolver_preparse

Status: auto-obsoleted due to no activity on 2024/12/27 21:34
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+b0798878a9d0be878a54@syzkaller.appspotmail.com
First crash: 379d, last: 372d
Bug presence (2)
Date Name Commit Repro Result
2024/01/10 linux-5.15.y (ToT) 26c690eff0a5 C [report] KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/10 upstream (ToT) affc5af36bbb C Didn't crash
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 KASAN: slab-out-of-bounds Read in dns_resolver_preparse origin:lts-only C inconclusive 16 377d 384d 0/3 upstream: reported C repro on 2024/01/03 14:33
upstream KASAN: slab-out-of-bounds Read in dns_resolver_preparse net C done 46 391d 404d 25/28 fixed on 2024/01/20 21:18
Last patch testing requests (2)
Created Duration User Patch Repo Result
2024/12/27 21:16 17m retest repro linux-5.15.y OK log
2024/10/14 20:32 1h24m retest repro linux-5.15.y error
Fix bisection attempts (5)
Created Duration User Patch Repo Result
2024/10/09 22:46 1m fix candidate upstream error job log
2024/05/14 17:27 1m fix candidate upstream error job log
2024/04/06 07:09 1m fix candidate upstream error job log
2024/03/06 20:43 1m fix candidate upstream error job log
2024/01/21 21:21 1m fix candidate upstream error job log

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in dns_resolver_preparse+0xcaf/0xd20 net/dns_resolver/dns_key.c:127
Read of size 1 at addr ffff88807c44b43c by task syz-executor.3/6571

CPU: 0 PID: 6571 Comm: syz-executor.3 Not tainted 5.15.146-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 print_address_description+0x63/0x3b0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:434 [inline]
 kasan_report+0x16b/0x1c0 mm/kasan/report.c:451
 dns_resolver_preparse+0xcaf/0xd20 net/dns_resolver/dns_key.c:127
 key_create_or_update+0x47b/0xbf0 security/keys/key.c:861
 __do_sys_add_key security/keys/keyctl.c:134 [inline]
 __se_sys_add_key+0x33b/0x480 security/keys/keyctl.c:74
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f4208052da9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f42065d40c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000f8
RAX: ffffffffffffffda RBX: 00007f4208181f80 RCX: 00007f4208052da9
RDX: 0000000020000440 RSI: 0000000020000080 RDI: 0000000020000040
RBP: 00007f420809f47a R08: fffffffffffffffb R09: 0000000000000000
R10: 0000000000000004 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f4208181f80 R15: 00007ffca64c9d48
 </TASK>

Allocated by task 6571:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track mm/kasan/common.c:46 [inline]
 set_alloc_info mm/kasan/common.c:434 [inline]
 ____kasan_kmalloc+0xba/0xf0 mm/kasan/common.c:513
 kasan_kmalloc include/linux/kasan.h:264 [inline]
 __kmalloc_node+0x199/0x390 mm/slub.c:4455
 kmalloc_node include/linux/slab.h:614 [inline]
 kvmalloc_node+0x80/0x140 mm/util.c:619
 kvmalloc include/linux/mm.h:805 [inline]
 __do_sys_add_key security/keys/keyctl.c:116 [inline]
 __se_sys_add_key+0x26c/0x480 security/keys/keyctl.c:74
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x61/0xcb

The buggy address belongs to the object at ffff88807c44b438
 which belongs to the cache kmalloc-8 of size 8
The buggy address is located 4 bytes inside of
 8-byte region [ffff88807c44b438, ffff88807c44b440)
The buggy address belongs to the page:
page:ffffea0001f112c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7c44b
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 ffffea0001d30e40 0000000300000003 ffff888011c41280
raw: 0000000000000000 0000000080660066 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 3548, ts 252482758403, free_ts 252482678271
 prep_new_page mm/page_alloc.c:2426 [inline]
 get_page_from_freelist+0x322a/0x33c0 mm/page_alloc.c:4159
 __alloc_pages+0x272/0x700 mm/page_alloc.c:5421
 alloc_slab_page mm/slub.c:1775 [inline]
 allocate_slab mm/slub.c:1912 [inline]
 new_slab+0xbb/0x4b0 mm/slub.c:1975
 ___slab_alloc+0x6f6/0xe10 mm/slub.c:3008
 __slab_alloc mm/slub.c:3095 [inline]
 slab_alloc_node mm/slub.c:3186 [inline]
 __kmalloc_node+0x1fa/0x390 mm/slub.c:4451
 kmalloc_node include/linux/slab.h:614 [inline]
 __vmalloc_area_node mm/vmalloc.c:2910 [inline]
 __vmalloc_node_range+0x2e2/0x8c0 mm/vmalloc.c:3029
 __vmalloc_node mm/vmalloc.c:3079 [inline]
 vzalloc+0x75/0x80 mm/vmalloc.c:3149
 alloc_counters+0xcf/0x7d0 net/ipv4/netfilter/arp_tables.c:659
 copy_entries_to_user net/ipv6/netfilter/ip6_tables.c:839 [inline]
 get_entries net/ipv6/netfilter/ip6_tables.c:1041 [inline]
 do_ip6t_get_ctl+0xea8/0x1890 net/ipv6/netfilter/ip6_tables.c:1671
 nf_getsockopt+0x28e/0x2b0 net/netfilter/nf_sockopt.c:116
 ipv6_getsockopt+0x468/0x2ff0 net/ipv6/ipv6_sockglue.c:1489
 tcp_getsockopt+0x26d/0x6c20 net/ipv4/tcp.c:4293
 __sys_getsockopt+0x2a6/0x550 net/socket.c:2240
 __do_sys_getsockopt net/socket.c:2255 [inline]
 __se_sys_getsockopt net/socket.c:2252 [inline]
 __x64_sys_getsockopt+0xb1/0xc0 net/socket.c:2252
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1340 [inline]
 free_pcp_prepare mm/page_alloc.c:1391 [inline]
 free_unref_page_prepare+0xc34/0xcf0 mm/page_alloc.c:3317
 free_unref_page+0x95/0x2d0 mm/page_alloc.c:3396
 __vunmap+0x8d4/0xa20 mm/vmalloc.c:2621
 __do_replace+0x8ba/0xae0 net/ipv6/netfilter/ip6_tables.c:1109
 do_replace net/ipv6/netfilter/ip6_tables.c:1156 [inline]
 do_ip6t_set_ctl+0x2d9c/0x3f50 net/ipv6/netfilter/ip6_tables.c:1638
 nf_setsockopt+0x28a/0x2b0 net/netfilter/nf_sockopt.c:101
 ipv6_setsockopt+0x2f9a/0x43a0 net/ipv6/ipv6_sockglue.c:1011
 tcp_setsockopt+0x23f/0x3680 net/ipv4/tcp.c:3694
 __sys_setsockopt+0x57e/0x990 net/socket.c:2196
 __do_sys_setsockopt net/socket.c:2207 [inline]
 __se_sys_setsockopt net/socket.c:2204 [inline]
 __x64_sys_setsockopt+0xb1/0xc0 net/socket.c:2204
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x61/0xcb

Memory state around the buggy address:
 ffff88807c44b300: fc fc fc fc fb fc fc fc fc fb fc fc fc fc fb fc
 ffff88807c44b380: fc fc fc fb fc fc fc fc fb fc fc fc fc fb fc fc
>ffff88807c44b400: fc fc fb fc fc fc fc 04 fc fc fc fc 05 fc fc fc
                                        ^
 ffff88807c44b480: fc fa fc fc fc fc fa fc fc fc fc fb fc fc fc fc
 ffff88807c44b500: fb fc fc fc fc fb fc fc fc fc fb fc fc fc fc fb
==================================================================

Crashes (31):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/01/15 13:20 linux-5.15.y 26c690eff0a5 551587c1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/15 13:19 linux-5.15.y 26c690eff0a5 551587c1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/09 20:16 linux-5.15.y 26c690eff0a5 4807fb37 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/09 20:16 linux-5.15.y 26c690eff0a5 4807fb37 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/09 20:16 linux-5.15.y 26c690eff0a5 4807fb37 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/09 05:51 linux-5.15.y 26c690eff0a5 4c0fd4bb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/15 18:32 linux-5.15.y 26c690eff0a5 2a7bcc7f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/15 13:36 linux-5.15.y 26c690eff0a5 551587c1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/15 13:10 linux-5.15.y 26c690eff0a5 551587c1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/12 21:52 linux-5.15.y 26c690eff0a5 551587c1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/12 21:05 linux-5.15.y 26c690eff0a5 551587c1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/12 19:51 linux-5.15.y 26c690eff0a5 551587c1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/12 18:55 linux-5.15.y 26c690eff0a5 551587c1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/12 02:36 linux-5.15.y 26c690eff0a5 dda5a988 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/12 02:28 linux-5.15.y 26c690eff0a5 dda5a988 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/12 00:11 linux-5.15.y 26c690eff0a5 dda5a988 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/11 23:25 linux-5.15.y 26c690eff0a5 dda5a988 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/11 12:34 linux-5.15.y 26c690eff0a5 00f3cc59 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/11 10:55 linux-5.15.y 26c690eff0a5 00f3cc59 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/11 09:56 linux-5.15.y 26c690eff0a5 00f3cc59 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/11 08:00 linux-5.15.y 26c690eff0a5 00f3cc59 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/10 20:13 linux-5.15.y 26c690eff0a5 04815ef1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/10 19:44 linux-5.15.y 26c690eff0a5 04815ef1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/10 16:27 linux-5.15.y 26c690eff0a5 04815ef1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/10 12:26 linux-5.15.y 26c690eff0a5 b438bd66 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/10 06:06 linux-5.15.y 26c690eff0a5 b438bd66 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/10 04:29 linux-5.15.y 26c690eff0a5 b438bd66 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/10 03:23 linux-5.15.y 26c690eff0a5 b438bd66 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/10 03:00 linux-5.15.y 26c690eff0a5 b438bd66 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/10 02:45 linux-5.15.y 26c690eff0a5 b438bd66 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in dns_resolver_preparse
2024/01/09 20:16 linux-5.15.y 26c690eff0a5 4807fb37 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in dns_resolver_preparse
* Struck through repros no longer work on HEAD.