From: "Aurélien Aptel" <aaptel@suse.com>
To: Steve French <smfrench@gmail.com>,
CIFS <linux-cifs@vger.kernel.org>,
linux-cifsd-devel@lists.sourceforge.net
Cc: Namjae Jeon <namjae.jeon@samsung.com>
Subject: Re: ksmbd testing progress - buildbot run passed
Date: Wed, 21 Apr 2021 19:51:01 +0200 [thread overview]
Message-ID: <875z0fzfui.fsf@suse.com> (raw)
In-Reply-To: <CAH2r5mse7yH8VxL4x3bRz1qe2K1p69mo6ApMZzQH_v8ZLpy6kA@mail.gmail.com>
Hi,
I have started a small project to test ksmbd by fuzzing.
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://github.com/aaptel/fuzzotron
I haven't had time to finish it, TCON creation fails with ACCESS_DENIED,
I haven't figured out why yet :(
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.
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.
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.
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)
next prev parent reply other threads:[~2021-04-21 17:51 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 [this message]
2021-04-21 23:33 ` Namjae Jeon
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=875z0fzfui.fsf@suse.com \
--to=aaptel@suse.com \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-cifsd-devel@lists.sourceforge.net \
--cc=namjae.jeon@samsung.com \
--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