linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Namjae Jeon" <namjae.jeon@samsung.com>
To: "'Aurélien Aptel'" <aaptel@suse.com>
Cc: "'Steve French'" <smfrench@gmail.com>,
	"'CIFS'" <linux-cifs@vger.kernel.org>,
	<linux-cifsd-devel@lists.sourceforge.net>
Subject: RE: ksmbd testing progress - buildbot run passed
Date: Thu, 22 Apr 2021 08:33:39 +0900	[thread overview]
Message-ID: <029501d73706$c1d85270$4588f750$@samsung.com> (raw)
In-Reply-To: <875z0fzfui.fsf@suse.com>

> 
> Hi,
Hi Aurélien,

> 
> I have started a small project to test ksmbd by fuzzing.
Really great work!, We can add this to buildbot test of ksmbd.

> 
> It's based on an existing project called Fuzzotron and it's not finished yet. I have taken code from
> libsmb2 and other places to setup a valid connection (negprot, sess setup, tcon) before the fuzzing
> starts. The code is very messy, not clean at all (all SMB2 logic is in callback.c)
> 
> https://protect2.fireeye.com/v1/url?k=d034d6f7-8fafefb8-d0355db8-0cc47a30d446-
> a31c437df7256da6&q=1&e=2ad65418-4da5-4fd7-85e8-
> 61c1b0dea5c7&u=https%3A%2F%2Fgithub.com%2Faaptel%2Ffuzzotron
> 
> I haven't had time to finish it, TCON creation fails with ACCESS_DENIED, I haven't figured out why
> yet :(
Okay, I will join this project after ksmbd upstream is completed.

> 
> Maybe there's a better project to fuzz network servers, I've just used fuzzotron because the code
> looked simple enough. The callback.c has all the required code so it should be relatively easy to move
> to another fuzzer.
Let me check it.
> 
> I think it would be very useful to run this on ksmbd, because:
> 
> - the stakes of security issues in that code are very high.
> - it would make people trust ksmbd code a lot more if it passes this.
Agreed.

> 
> Quick how to if you want to give it a try:
> * get radamsa https://gitlab.com/akihe/radamsa and compile it, put it in $PATH
> * make a test folder to be used for test input samples (valid SMB2 packets)
> - dd if=/dev/urandom of=test/sample1 bs=1K count=1 (simple invalid test)
> * make a script to test if server crashed, for example:
> - echo 'ping -c1 192.168.2.110' > check.sh
> * run
> ./fuzzotron --radamsa --directory $PWD/test -h 192.168.2.110 -p 445 -P tcp -z "$PWD/check.sh" -o
> output
> 
> Unfortunately it fails because of bad TCON creation right now, as I said earlier... I need to find
> some time to find the issue.
Okay, We are focusing on ksmbd upstream now, Only if it is completed, We will be able to work together.
And It is really necessary for ksmbd and thank you for sharing your work!

> 
> Cheers,
> --
> Aurélien Aptel / SUSE Labs Samba Team
> GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3 SUSE Software Solutions Germany GmbH,
> Maxfeldstr. 5, 90409 Nürnberg, DE
> GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)




      reply	other threads:[~2021-04-21 23:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-21 17:18 ksmbd testing progress - buildbot run passed Steve French
2021-04-21 17:42 ` [Linux-cifsd-devel] " Marios Makassikis
2021-04-21 17:55   ` Steve French
2021-04-21 18:19     ` Marios Makassikis
2021-04-21 17:51 ` Aurélien Aptel
2021-04-21 23:33   ` Namjae Jeon [this message]

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='029501d73706$c1d85270$4588f750$@samsung.com' \
    --to=namjae.jeon@samsung.com \
    --cc=aaptel@suse.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-cifsd-devel@lists.sourceforge.net \
    --cc=smfrench@gmail.com \
    /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).