From: Petar Penkov <peterpenkov96@gmail.com>
To: netdev@vger.kernel.org
Cc: Petar Penkov <peterpenkov96@gmail.com>
Subject: [PATCH,net-next,0/2] Improve code coverage of syzkaller
Date: Tue, 19 Sep 2017 00:34:00 -0700 [thread overview]
Message-ID: <20170919073402.2292-1-peterpenkov96@gmail.com> (raw)
The following patches address this by providing the user(syzkaller)
with the ability to send via napi_gro_receive() and napi_gro_frags().
Additionally, syzkaller can specify how many fragments there are and
how much data per fragment there is. This is done by exploiting the
convenient structure of iovecs. Finally, this patch series adds
support for exercising the flow dissector during fuzzing.
The code path including napi_gro_receive() can be enabled via the
CONFIG_TUN_NAPI compile-time flag, and can be used by users other than
syzkaller. The remainder of the changes in this patch series give the
user significantly more control over packets entering the kernel. To
avoid potential security vulnerabilities, hide the ability to send
custom skbs and the flow dissector code paths behind a run-time flag
IFF_NAPI_FRAGS that is advertised and accepted only if CONFIG_TUN_NAPI
is enabled.
The patch series will be followed with changes to packetdrill, where
these additions to the TUN driver are exercised and demonstrated.
This will give the ability to write regression tests for specific
parts of the early networking stack.
Patch 1/ Add NAPI struct per receive queue, enable NAPI, and use
napi_gro_receive()
Patch 2/ Use NAPI skb and napi_gro_frags(), exercise flow
dissector, and allow custom skbs.
Petar Penkov (2):
tun: enable NAPI for TUN/TAP driver
tun: enable napi_gro_frags() for TUN/TAP driver
drivers/net/Kconfig | 8 ++
drivers/net/tun.c | 251 +++++++++++++++++++++++++++++++++++++++++---
include/uapi/linux/if_tun.h | 1 +
3 files changed, 246 insertions(+), 14 deletions(-)
--
2.11.0
next reply other threads:[~2017-09-19 7:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-19 7:34 Petar Penkov [this message]
2017-09-19 7:34 ` [PATCH,net-next,1/2] tun: enable NAPI for TUN/TAP driver Petar Penkov
2017-09-20 2:51 ` Eric Dumazet
2017-09-19 7:34 ` [PATCH,net-next,2/2] tun: enable napi_gro_frags() " Petar Penkov
2017-09-20 3:16 ` Eric Dumazet
2017-09-19 23:01 ` [PATCH,net-next,0/2] Improve code coverage of syzkaller David Miller
2017-09-20 4:26 ` Petar Penkov
2017-09-20 6:08 ` David Miller
2017-09-20 15:38 ` Willem de Bruijn
2017-09-20 16:36 ` David Miller
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=20170919073402.2292-1-peterpenkov96@gmail.com \
--to=peterpenkov96@gmail.com \
--cc=netdev@vger.kernel.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).