syzbot


KASAN: stack-out-of-bounds Read in strlcpy

Status: public: reported C repro on 2019/04/12 00:00
Reported-by: syzbot+55f105a4b4a3d0de31fa@syzkaller.appspotmail.com
First crash: 2555d, last: 2287d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-49 KASAN: stack-out-of-bounds Read in strlcpy C 1769 2287d 2077d 0/3 public: reported C repro on 2019/04/12 00:00

Sample crash report:
random: sshd: uninitialized urandom read (32 bytes read, 105 bits of entropy available)
==================================================================
BUG: KASAN: stack-out-of-bounds in strlen lib/string.c:481 [inline]
BUG: KASAN: stack-out-of-bounds in strlcpy+0x101/0x120 lib/string.c:141
Read of size 1 at addr ffff8801d742fb3c by task syzkaller406068/3321

CPU: 1 PID: 3321 Comm: syzkaller406068 Not tainted 4.4.110-g618a510 #15
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
 0000000000000000 1e45d3b5c2de3ff3 ffff8801d742fa18 ffffffff81d04e3d
 ffffea00075d0bc0 ffff8801d742fb3c 0000000000000000 ffff8801d742fb3c
 ffff8801d742fc20 ffff8801d742fa50 ffffffff814fd1f3 ffff8801d742fb3c
Call Trace:
 [<ffffffff81d04e3d>] __dump_stack lib/dump_stack.c:15 [inline]
 [<ffffffff81d04e3d>] dump_stack+0xc1/0x124 lib/dump_stack.c:51
 [<ffffffff814fd1f3>] print_address_description+0x73/0x260 mm/kasan/report.c:252
 [<ffffffff814fd705>] kasan_report_error mm/kasan/report.c:351 [inline]
 [<ffffffff814fd705>] kasan_report+0x285/0x370 mm/kasan/report.c:408
 [<ffffffff814fd804>] __asan_report_load1_noabort+0x14/0x20 mm/kasan/report.c:426
 [<ffffffff81d21ce1>] strlen lib/string.c:481 [inline]
 [<ffffffff81d21ce1>] strlcpy+0x101/0x120 lib/string.c:141
 [<ffffffff83031762>] xt_copy_counters_from_user+0x152/0x2c0 net/netfilter/x_tables.c:793
 [<ffffffff83269566>] do_add_counters+0x96/0x590 net/ipv6/netfilter/ip6_tables.c:1334
 [<ffffffff8326f41f>] compat_do_ipt_set_ctl+0xbf/0x150 net/ipv4/netfilter/ip_tables.c:1725
 [<ffffffff82f988a8>] compat_nf_sockopt net/netfilter/nf_sockopt.c:143 [inline]
 [<ffffffff82f988a8>] compat_nf_setsockopt+0x88/0x130 net/netfilter/nf_sockopt.c:155
 [<ffffffff830ffd1d>] compat_ip_setsockopt+0x9d/0xf0 net/ipv4/ip_sockglue.c:1255
 [<ffffffff83108f05>] inet_csk_compat_setsockopt+0x95/0x120 net/ipv4/inet_connection_sock.c:914
 [<ffffffff8311e78d>] compat_tcp_setsockopt+0x3d/0x70 net/ipv4/tcp.c:2643
 [<ffffffff82df3dd2>] compat_sock_common_setsockopt+0xb2/0x140 net/core/sock.c:2670
 [<ffffffff82edb0a9>] C_SYSC_setsockopt net/compat.c:384 [inline]
 [<ffffffff82edb0a9>] compat_SyS_setsockopt+0x149/0x290 net/compat.c:367
 [<ffffffff81006d84>] do_syscall_32_irqs_on arch/x86/entry/common.c:390 [inline]
 [<ffffffff81006d84>] do_fast_syscall_32+0x314/0x890 arch/x86/entry/common.c:457
 [<ffffffff83776faa>] sysenter_flags_fixed+0xd/0x17

The buggy address belongs to the page:
page:ffffea00075d0bc0 count:0 mapcount:0 mapping:          (null) index:0x0
flags: 0x8000000000000000()
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8801d742fa00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff8801d742fa80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1
>ffff8801d742fb00: f1 f1 f1 00 00 00 00 04 f2 f2 f2 00 00 00 00 00
                                        ^
 ffff8801d742fb80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff8801d742fc00: f1 f1 f1 f1 00 00 00 00 00 f2 f2 f2 00 00 00 00
==================================================================

Crashes (1784):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/01/09 22:19 https://android.googlesource.com/kernel/common android-4.4 618a5108ea9c 1f60c828 .config console log report syz C ci-android-44-kasan-gce-386
2017/12/26 21:19 https://android.googlesource.com/kernel/common android-4.4 610c835673f3 73aba437 .config console log report syz C ci-android-44-kasan-gce-386
2017/12/26 21:06 https://android.googlesource.com/kernel/common android-4.4 610c835673f3 73aba437 .config console log report syz C ci-android-44-kasan-gce-386
2017/12/26 12:48 https://android.googlesource.com/kernel/common android-4.4 610c835673f3 73aba437 .config console log report syz C ci-android-44-kasan-gce-386
2017/12/19 15:29 https://android.googlesource.com/kernel/common android-4.4 170051828437 af9163c7 .config console log report syz C ci-android-44-kasan-gce-386
2018/04/16 04:47 https://android.googlesource.com/kernel/common android-4.4 38f41ec1cb31 7a67784c .config console log report syz ci-android-44-kasan-gce-386
2018/08/28 21:36 https://android.googlesource.com/kernel/common android-4.4 5e24b4e4d372 b771b17e .config console log report ci-android-44-kasan-gce
2018/08/26 02:57 https://android.googlesource.com/kernel/common android-4.4 e5c5f1fae55d 76e7c3df .config console log report ci-android-44-kasan-gce
2018/08/26 01:46 https://android.googlesource.com/kernel/common android-4.4 e5c5f1fae55d 76e7c3df .config console log report ci-android-44-kasan-gce
2018/08/25 01:48 https://android.googlesource.com/kernel/common android-4.4 e15716b49f04 9b0f5c75 .config console log report ci-android-44-kasan-gce
2018/09/13 09:33 https://android.googlesource.com/kernel/common android-4.4 b3f777efd917 71907daf .config console log report ci-android-44-kasan-gce-386
2018/09/12 09:26 https://android.googlesource.com/kernel/common android-4.4 b3f777efd917 3c88136c .config console log report ci-android-44-kasan-gce-386
2018/09/12 02:12 https://android.googlesource.com/kernel/common android-4.4 b3f777efd917 4ae17b1f .config console log report ci-android-44-kasan-gce-386
2018/09/11 05:26 https://android.googlesource.com/kernel/common android-4.4 b3f777efd917 8c88323f .config console log report ci-android-44-kasan-gce-386
2018/09/11 05:24 https://android.googlesource.com/kernel/common android-4.4 b3f777efd917 8c88323f .config console log report ci-android-44-kasan-gce-386
2018/09/10 07:16 https://android.googlesource.com/kernel/common android-4.4 b68e78cfbd1d 6b5120a4 .config console log report ci-android-44-kasan-gce-386
2018/09/09 22:13 https://android.googlesource.com/kernel/common android-4.4 b68e78cfbd1d 6b5120a4 .config console log report ci-android-44-kasan-gce-386
2018/09/09 12:37 https://android.googlesource.com/kernel/common android-4.4 b68e78cfbd1d 6b5120a4 .config console log report ci-android-44-kasan-gce-386
2018/09/09 01:15 https://android.googlesource.com/kernel/common android-4.4 b68e78cfbd1d 6b5120a4 .config console log report ci-android-44-kasan-gce-386
2018/09/09 00:03 https://android.googlesource.com/kernel/common android-4.4 b68e78cfbd1d 6b5120a4 .config console log report ci-android-44-kasan-gce-386
2018/09/08 21:36 https://android.googlesource.com/kernel/common android-4.4 b68e78cfbd1d 6b5120a4 .config console log report ci-android-44-kasan-gce-386
2018/09/08 14:57 https://android.googlesource.com/kernel/common android-4.4 b68e78cfbd1d 6b5120a4 .config console log report ci-android-44-kasan-gce-386
2018/09/07 18:38 https://android.googlesource.com/kernel/common android-4.4 b68e78cfbd1d 69cfeb80 .config console log report ci-android-44-kasan-gce-386
2018/09/07 13:07 https://android.googlesource.com/kernel/common android-4.4 b68e78cfbd1d e30d3b52 .config console log report ci-android-44-kasan-gce-386
2018/09/07 11:23 https://android.googlesource.com/kernel/common android-4.4 b68e78cfbd1d e30d3b52 .config console log report ci-android-44-kasan-gce-386
2018/09/07 01:10 https://android.googlesource.com/kernel/common android-4.4 b68e78cfbd1d e30d3b52 .config console log report ci-android-44-kasan-gce-386
2018/09/06 23:06 https://android.googlesource.com/kernel/common android-4.4 b68e78cfbd1d e30d3b52 .config console log report ci-android-44-kasan-gce-386
2018/09/06 21:10 https://android.googlesource.com/kernel/common android-4.4 b68e78cfbd1d 0bb7a7eb .config console log report ci-android-44-kasan-gce-386
2018/09/06 04:21 https://android.googlesource.com/kernel/common android-4.4 b2cf10ee86d7 873745f2 .config console log report ci-android-44-kasan-gce-386
2018/09/05 20:40 https://android.googlesource.com/kernel/common android-4.4 d762e28031e9 196410e4 .config console log report ci-android-44-kasan-gce-386
2018/09/05 19:23 https://android.googlesource.com/kernel/common android-4.4 d762e28031e9 196410e4 .config console log report ci-android-44-kasan-gce-386
2018/09/05 08:11 https://android.googlesource.com/kernel/common android-4.4 05cccc3367f4 a4718693 .config console log report ci-android-44-kasan-gce-386
2018/09/04 16:08 https://android.googlesource.com/kernel/common android-4.4 7e85a4b796e8 a4718693 .config console log report ci-android-44-kasan-gce-386
2018/09/04 12:11 https://android.googlesource.com/kernel/common android-4.4 7e85a4b796e8 a4718693 .config console log report ci-android-44-kasan-gce-386
2018/09/03 21:48 https://android.googlesource.com/kernel/common android-4.4 7e85a4b796e8 a4718693 .config console log report ci-android-44-kasan-gce-386
2018/09/02 09:43 https://android.googlesource.com/kernel/common android-4.4 7e85a4b796e8 a4718693 .config console log report ci-android-44-kasan-gce-386
2018/09/02 06:59 https://android.googlesource.com/kernel/common android-4.4 7e85a4b796e8 a4718693 .config console log report ci-android-44-kasan-gce-386
2018/08/30 18:55 https://android.googlesource.com/kernel/common android-4.4 5e24b4e4d372 938220fd .config console log report ci-android-44-kasan-gce-386
2018/08/30 05:38 https://android.googlesource.com/kernel/common android-4.4 5e24b4e4d372 6c7e9d3d .config console log report ci-android-44-kasan-gce-386
2018/08/29 14:47 https://android.googlesource.com/kernel/common android-4.4 5e24b4e4d372 53ff8784 .config console log report ci-android-44-kasan-gce-386
2018/08/27 18:03 https://android.googlesource.com/kernel/common android-4.4 e5c5f1fae55d 758cd203 .config console log report ci-android-44-kasan-gce-386
2018/08/27 01:07 https://android.googlesource.com/kernel/common android-4.4 e5c5f1fae55d 758cd203 .config console log report ci-android-44-kasan-gce-386
2018/08/26 21:27 https://android.googlesource.com/kernel/common android-4.4 e5c5f1fae55d 758cd203 .config console log report ci-android-44-kasan-gce-386
2018/08/26 16:22 https://android.googlesource.com/kernel/common android-4.4 e5c5f1fae55d 758cd203 .config console log report ci-android-44-kasan-gce-386
2018/08/26 00:05 https://android.googlesource.com/kernel/common android-4.4 e5c5f1fae55d 76e7c3df .config console log report ci-android-44-kasan-gce-386
2018/08/24 21:43 https://android.googlesource.com/kernel/common android-4.4 e15716b49f04 9b0f5c75 .config console log report ci-android-44-kasan-gce-386
2018/08/24 13:03 https://android.googlesource.com/kernel/common android-4.4 727cface4651 95b5c82b .config console log report ci-android-44-kasan-gce-386
2018/08/23 17:27 https://android.googlesource.com/kernel/common android-4.4 37af2ff398ac 95b5c82b .config console log report ci-android-44-kasan-gce-386
2018/08/23 15:06 https://android.googlesource.com/kernel/common android-4.4 37af2ff398ac 95b5c82b .config console log report ci-android-44-kasan-gce-386
* Struck through repros no longer work on HEAD.