From: Johannes Berg <johannes@sipsolutions.net>
To: Ethan Graham <ethan.w.s.graham@gmail.com>,
ethangraham@google.com, glider@google.com
Cc: andreyknvl@gmail.com, brendan.higgins@linux.dev,
davidgow@google.com, dvyukov@google.com, jannh@google.com,
elver@google.com, rmoar@google.com, shuah@kernel.org,
tarasmadan@google.com, kasan-dev@googlegroups.com,
kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, dhowells@redhat.com, lukas@wunner.de,
ignat@cloudflare.com, herbert@gondor.apana.org.au,
davem@davemloft.net, linux-crypto@vger.kernel.org
Subject: Re: [PATCH v2 RFC 0/7] KFuzzTest: a new kernel fuzzing framework
Date: Mon, 08 Sep 2025 15:11:08 +0200 [thread overview]
Message-ID: <513c854db04a727a20ad1fb01423497b3428eea6.camel@sipsolutions.net> (raw)
In-Reply-To: <20250901164212.460229-1-ethan.w.s.graham@gmail.com>
Hi Ethan,
Since I'm looking at some WiFi fuzzing just now ...
> The primary motivation for KFuzzTest is to simplify the fuzzing of
> low-level, relatively stateless functions (e.g., data parsers, format
> converters)
Could you clarify what you mean by "relatively" here? It seems to me
that if you let this fuzz say something like
cfg80211_inform_bss_frame_data(), which parses a frame and registers it
in the global scan list, you might quickly run into the 1000 limit of
the list, etc. since these functions are not stateless. OTOH, it's
obviously possible to just receive a lot of such frames over the air
even, or over simulated air like in syzbot today already.
> This RFC continues to seek feedback on the overall design of KFuzzTest
> and the minor changes made in V2. We are particularly interested in
> comments on:
> - The ergonomics of the API for defining fuzz targets.
> - The overall workflow and usability for a developer adding and running
> a new in-kernel fuzz target.
> - The high-level architecture.
As far as the architecture is concerned, I'm reading this is built
around syzkaller (like) architecture, in that the fuzzer lives in the
fuzzed kernel's userspace, right?
> We would like to thank David Gow for his detailed feedback regarding the
> potential integration with KUnit. The v1 discussion highlighted three
> potential paths: making KFuzzTests a special case of KUnit tests, sharing
> implementation details in a common library, or keeping the frameworks
> separate while ensuring API familiarity.
>
> Following a productive conversation with David, we are moving forward
> with the third option for now. While tighter integration is an
> attractive long-term goal, we believe the most practical first step is
> to establish KFuzzTest as a valuable, standalone framework.
I have been wondering about this from another perspective - with kunit
often running in ARCH=um, and there the kernel being "just" a userspace
process, we should be able to do a "classic" afl-style fork approach to
fuzzing. That way, state doesn't really (have to) matter at all. This is
of course both an advantage (reproducing any issue found is just the
right test with a single input) and disadvantage (the fuzzer won't
modify state first and then find an issue on a later round.)
I was just looking at what external state (such as the physical memory
mapped) UML has and that would need to be disentangled, and it's not
_that_ much if we can have specific configurations, and maybe mostly
shut down the userspace that's running inside UML (and/or have kunit
execute before init/pid 1 when builtin.)
Did you consider such a model at all, and have specific reasons for not
going in this direction, or simply didn't consider because you're coming
from the syzkaller side anyway?
johannes
next prev parent reply other threads:[~2025-09-08 13:11 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-01 16:42 [PATCH v2 RFC 0/7] KFuzzTest: a new kernel fuzzing framework Ethan Graham
2025-09-01 16:42 ` [PATCH v2 RFC 1/7] mm/kasan: implement kasan_poison_range Ethan Graham
2025-09-05 8:32 ` Alexander Potapenko
2025-09-05 8:46 ` Ethan Graham
2025-09-05 9:32 ` Alexander Potapenko
2025-09-01 16:42 ` [PATCH v2 RFC 2/7] kfuzztest: add user-facing API and data structures Ethan Graham
2025-09-02 10:37 ` Marco Elver
2025-09-03 8:40 ` Alexander Potapenko
2025-09-03 10:15 ` Alexander Potapenko
2025-09-03 11:35 ` Alexander Potapenko
2025-09-01 16:42 ` [PATCH v2 RFC 3/7] kfuzztest: implement core module and input processing Ethan Graham
2025-09-03 9:53 ` Alexander Potapenko
2025-09-01 16:42 ` [PATCH v2 RFC 4/7] tools: add kfuzztest-bridge utility Ethan Graham
2025-09-03 14:07 ` Alexander Potapenko
2025-09-05 10:43 ` Alexander Potapenko
2025-09-01 16:42 ` [PATCH v2 RFC 5/7] kfuzztest: add ReST documentation Ethan Graham
2025-09-04 8:53 ` Alexander Potapenko
2025-09-01 16:42 ` [PATCH v2 RFC 6/7] kfuzztest: add KFuzzTest sample fuzz targets Ethan Graham
2025-09-04 9:59 ` Alexander Potapenko
2025-09-01 16:42 ` [PATCH v2 RFC 7/7] crypto: implement KFuzzTest targets for PKCS7 and RSA parsing Ethan Graham
2025-09-03 8:58 ` Ignat Korchagin
2025-09-04 20:20 ` Ethan Graham
2025-09-04 9:11 ` [PATCH v2 RFC 0/7] KFuzzTest: a new kernel fuzzing framework David Gow
2025-09-04 20:08 ` Ethan Graham
2025-09-08 13:11 ` Johannes Berg [this message]
2025-09-10 10:40 ` Alexander Potapenko
2025-09-10 15:59 ` Johannes Berg
2025-09-11 13:59 ` Johannes Berg
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=513c854db04a727a20ad1fb01423497b3428eea6.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=andreyknvl@gmail.com \
--cc=brendan.higgins@linux.dev \
--cc=davem@davemloft.net \
--cc=davidgow@google.com \
--cc=dhowells@redhat.com \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=ethan.w.s.graham@gmail.com \
--cc=ethangraham@google.com \
--cc=glider@google.com \
--cc=herbert@gondor.apana.org.au \
--cc=ignat@cloudflare.com \
--cc=jannh@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=kunit-dev@googlegroups.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lukas@wunner.de \
--cc=rmoar@google.com \
--cc=shuah@kernel.org \
--cc=tarasmadan@google.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).