netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Vyukov <dvyukov@google.com>
To: William Tu <u9012063@gmail.com>
Cc: David Ahern <dsahern@gmail.com>,
	syzbot <syzbot+9723f2d288e49b492cf0@syzkaller.appspotmail.com>,
	David Miller <davem@davemloft.net>,
	Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>,
	syzkaller-bugs@googlegroups.com,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Subject: Re: KASAN: slab-out-of-bounds Read in erspan_xmit
Date: Tue, 23 Jan 2018 20:45:57 +0100	[thread overview]
Message-ID: <CACT4Y+Yh9PAfG2k08BqTx07az7KLTkFvYmE4zCuuR4n0HF_WEw@mail.gmail.com> (raw)
In-Reply-To: <CALDO+SaRJ29kauv6Us0+UkZdgVsLGod8pEVjC_SvKcgMSdkLtA@mail.gmail.com>

On Tue, Jan 23, 2018 at 8:17 PM, William Tu <u9012063@gmail.com> wrote:
> Thanks for the reply.
>
> On Tue, Jan 23, 2018 at 11:03 AM, Dmitry Vyukov <dvyukov@google.com> wrote:
>> On Tue, Jan 23, 2018 at 7:58 PM, David Ahern <dsahern@gmail.com> wrote:
>>> On 1/23/18 11:50 AM, William Tu wrote:
>>>> Hi,
>>>>
>>>> I'm new to kasan and trying to follow this instruction to reproduce the issue:
>>>> https://github.com/google/syzkaller/blob/master/docs/executing_syzkaller_programs.md
>>>>
>>>> After re-compile my kernel with KASAN related config enable, I run
>>>> $ ./syz-execprog -cover=0 -repeat=0 -procs=16 program
>>>>
>>>> I wonder does the "program" mean the repro.c.txt? or I should compile
>>>> it to binary?
>>>> # gcc -o program repro.c.txt
>>>> # ./syz-execprog myprogram
>>>> 2018/01/23 10:45:19 parsed 0 programs
>>>>
>>>> And how to use the "repro.syz.txt"?
>>>> It seems to have some command like "syz_emit_ethernet" to generate packet.
>>>> but I have no clue where to run it. Maybe I'm still missing something?
>>>>
>>>
>>> In the past I have only compiled a kernel with KASAN, compiled the
>>> reproducer program and run it in a VM. No need for the syzbot overhead.
>>
>> Yes, if C program reproducer the crash then it's easier to use.
>> repro.c.txt is the C program, you need to rename it to repro.c,
>> compile with gcc and run just as ./a.out.
>> But make sure that you have a gcc that supports KASAN (kernel build
>> does not in the beginning on compiler not supporting KASAN). I think
>> it's at least gcc 5+, but gcc 7+ would be better.
>
> I was using gcc 5+ and "gcc repro.c".
> Running ./a.out does not show any issue on dmesg. Let me switch to gcc 7+.
>
>>
>> You can also run the syzkaller reproducer as:
>> ./syz-execprog -cover=0 -repeat=0 -procs=16 repro.syz.txt
>
> When using repro.syz.txt, which binary or what tests does it execute?

It interprets the program in syzkaller notation in repro.syz.txt file.
It should be more of less equivalent to repro.c.txt C program in
behavior.


> I didn't see it uses/compiles the repro.c.txt.
> But it seems to run something...
> ~/net-next# ./syz-execprog -cover=0 -repeat=0 -procs=2 repro.syz.txt
> 2018/01/23 11:15:24 parsed 1 programs
> 2018/01/23 11:15:24 executed programs: 0
> 2018/01/23 11:15:29 executed programs: 210
> 2018/01/23 11:15:34 executed programs: 422
> ..
>
> Thanks
> William

  reply	other threads:[~2018-01-23 19:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-22 19:58 KASAN: slab-out-of-bounds Read in erspan_xmit syzbot
2018-01-22 22:45 ` David Ahern
2018-01-22 22:57   ` William Tu
2018-01-23 18:50     ` William Tu
2018-01-23 18:58       ` David Ahern
2018-01-23 19:03         ` Dmitry Vyukov
2018-01-23 19:17           ` William Tu
2018-01-23 19:45             ` Dmitry Vyukov [this message]
2018-01-23 23:54               ` William Tu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACT4Y+Yh9PAfG2k08BqTx07az7KLTkFvYmE4zCuuR4n0HF_WEw@mail.gmail.com \
    --to=dvyukov@google.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=syzbot+9723f2d288e49b492cf0@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=u9012063@gmail.com \
    --cc=yoshfuji@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).