Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support server fuzzing #11

Merged
merged 19 commits into from
Oct 19, 2018
Merged

Support server fuzzing #11

merged 19 commits into from
Oct 19, 2018

Conversation

Aaron1011
Copy link
Collaborator

@Aaron1011 Aaron1011 commented Oct 15, 2018

This PR makes several changes to allow fuzzing of a Roughtime server in roughenough-fuzz:

  • Extracts server code from roughenough-server.rs into a new Server struct.
  • Moves the core server processing into a standalone function, suitable for calling from a fuzz wrapper.
  • Adds a MemoryConfig struct, to allow a fuzz wrapper to easily create a ServerConfig.
  • Adds a new method Server::send_to_self, gated behind #[cfg(fuzzing)]. It allows the server to feed messages to itself using a separate client UdpSocket instance.
  • Add a new --outputflag to roughenough-client, which causes the client to write all of its requests to a file. This can be used to easily generate fuzzer inputs to the server.

I've left this PR as a series of several commits, but I can squash them once you think this is ready to merge.

Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@int08h
Copy link
Owner

int08h commented Oct 19, 2018

Hi @Aaron1011! This is really awesome.

I'm very impressed you based this on 1.1 as I'm churning on that a lot, sorry if it caused you extra work.

I'm going to go ahead and merge this to 1.1 so you can keep going. I think a errant hyper reference broke the build. I'm not sure if I introduced it or one of your changes. Nope, I broke it in 54955e4. Fixing it now.

@int08h int08h merged commit b801eda into int08h:1.1 Oct 19, 2018
@int08h
Copy link
Owner

int08h commented Oct 19, 2018

@Aaron1011 thanks for your continued contributions to Roughenough. I've added you as a contributor to roughenough and roughenough-fuzz so you can commit directly. You're the first roughenough contributor other than myself and I honestly never expected to attract much interest!

I don't have any grand "governance" plans. For now, how about we mutually coordinate future releases? Additionally, given your more extensive experience as an open-source contributor if you have suggestions on how we best coordinate a small project like this, I'm open to them.

@Aaron1011 Aaron1011 deleted the better-fuzz branch October 19, 2018 18:12
int08h added a commit that referenced this pull request Oct 27, 2018
Squashed commit of the following:

commit 86345e4
Author: Stuart Stock <[email protected]>
Date:   Sat Oct 27 14:07:36 2018 -0500

    Add changelog, including notes for 1.1

commit f84d4d7
Author: Stuart Stock <[email protected]>
Date:   Sat Oct 27 13:22:53 2018 -0500

    Additional documentation; rustfmt pass; extract stress test loop

commit 388976d
Author: Stuart Stock <[email protected]>
Date:   Fri Oct 26 22:33:36 2018 -0500

    Docs, polish, clean-ups for KMS and health-check features

commit eb06e63
Author: Stuart Stock <[email protected]>
Date:   Thu Oct 25 21:56:29 2018 -0500

    implement server TCP health check, #8

commit bed4ed8
Author: Stuart Stock <[email protected]>
Date:   Mon Oct 22 20:35:36 2018 -0500

    groundwork for TCP healthcheck in #8

commit 2225b7c
Author: Stuart Stock <[email protected]>
Date:   Sun Oct 21 20:36:07 2018 -0500

    tweak bounds check; will need a revisit

commit 5c92c22
Author: Stuart Stock <[email protected]>
Date:   Sun Oct 21 18:14:42 2018 -0500

    minor cfg tweak

commit 68788da
Author: Stuart Stock <[email protected]>
Date:   Sun Oct 21 17:30:57 2018 -0500

    Changes to keep Clippy happy

commit 608e43e
Author: Stuart Stock <[email protected]>
Date:   Sun Oct 21 16:41:51 2018 -0500

    Docstring updates and misc cleanups

commit 44e6212
Author: Stuart Stock <[email protected]>
Date:   Sun Oct 21 15:04:56 2018 -0500

    Add tests for envelope cypto and some enums

commit b22a6f0
Author: Stuart Stock <[email protected]>
Date:   Sun Oct 21 14:54:45 2018 -0500

    Add auxilliary data to KMS operations

commit 8ab9e36
Author: Stuart Stock <[email protected]>
Date:   Thu Oct 18 21:28:01 2018 -0500

    correct imports to fix build

commit b801eda
Merge: 54955e4 358de5e
Author: Stuart Stock <[email protected]>
Date:   Thu Oct 18 21:01:56 2018 -0500

    Merge pull request #11 from Aaron1011/better-fuzz

    Support server fuzzing

commit 358de5e
Author: Aaron Hill <[email protected]>
Date:   Mon Oct 15 15:27:47 2018 -0400

    Port seed error handling

commit 230d9a2
Author: Aaron Hill <[email protected]>
Date:   Sun Oct 14 20:38:54 2018 -0400

    Add license headers

commit 0b0c7c6
Author: Aaron Hill <[email protected]>
Date:   Sun Oct 14 20:35:57 2018 -0400

    Un-comment poll registration

commit 56961b6
Author: Aaron Hill <[email protected]>
Date:   Sun Oct 14 20:32:26 2018 -0400

    Run rustfmt

commit 1f09d27
Author: Aaron Hill <[email protected]>
Date:   Sun Oct 14 20:23:45 2018 -0400

    Add MemoryConfig

commit 204cb42
Author: Aaron Hill <[email protected]>
Date:   Sun Oct 14 20:10:10 2018 -0400

    Add fuzzing config

commit 5e8443b
Author: Aaron Hill <[email protected]>
Date:   Sun Oct 14 20:01:25 2018 -0400

    Add "output" argument to client

commit 7df8c58
Author: Aaron Hill <[email protected]>
Date:   Sun Oct 14 20:01:11 2018 -0400

    More cleanup

commit f08fc14
Author: Aaron Hill <[email protected]>
Date:   Sun Oct 14 19:49:09 2018 -0400

    Clean up imports

commit 170a7f2
Author: Aaron Hill <[email protected]>
Date:   Sun Oct 14 19:47:15 2018 -0400

    Add some documentation, remove more debugging statements

commit 26da9a8
Author: Aaron Hill <[email protected]>
Date:   Sun Oct 14 19:41:06 2018 -0400

    Move more things into Server struct

commit 03917ba
Author: Aaron Hill <[email protected]>
Date:   Sun Oct 14 19:37:01 2018 -0400

    Remove commented-out code

commit 1aba1c3
Author: Aaron Hill <[email protected]>
Date:   Sun Oct 14 19:36:21 2018 -0400

    Remove debug print

commit 0d70daa
Author: Aaron Hill <[email protected]>
Date:   Sun Oct 14 19:34:58 2018 -0400

    More changes to server

commit 7b04759
Author: Aaron Hill <[email protected]>
Date:   Sat Oct 13 21:10:23 2018 -0400

    Fixups for fuzzing

commit eb7698a
Author: Aaron Hill <[email protected]>
Date:   Sat Oct 13 20:16:47 2018 -0400

    Move config and public key into server

commit ceea631
Author: Aaron Hill <[email protected]>
Date:   Sat Oct 13 20:04:50 2018 -0400

    Move Server to its own module

commit 978eb3b
Author: Aaron Hill <[email protected]>
Date:   Sat Oct 13 19:55:10 2018 -0400

    Add send_to_self

commit c50c8ef
Author: Aaron Hill <[email protected]>
Date:   Sat Oct 13 19:51:01 2018 -0400

    Exact code into Server struct

commit 54955e4
Author: Stuart Stock <[email protected]>
Date:   Wed Oct 17 19:27:21 2018 -0500

    refactoring and tidying

commit 1b8ff27
Author: Stuart Stock <[email protected]>
Date:   Sun Oct 14 21:14:55 2018 -0500

    implement gcp decrypt

commit ac71e92
Author: Stuart Stock <[email protected]>
Date:   Sun Oct 14 14:47:09 2018 -0500

    one-way GCP KMS working

commit b1acebd
Author: Stuart Stock <[email protected]>
Date:   Sat Oct 13 16:13:06 2018 -0500

    documentation enhancements

commit fec19a7
Author: Stuart Stock <[email protected]>
Date:   Fri Oct 12 22:39:37 2018 -0500

    Refactor to kms module; add documentation

commit ed89d98
Author: Stuart Stock <[email protected]>
Date:   Thu Oct 11 21:33:08 2018 -0500

    rustfmt

commit dda76cf
Author: Stuart Stock <[email protected]>
Date:   Thu Oct 11 21:27:10 2018 -0500

    another wip checkpoint; server integration

commit c66513b
Author: Stuart Stock <[email protected]>
Date:   Tue Oct 9 20:54:49 2018 -0500

    continue work on kms

commit bab728c
Author: Stuart Stock <[email protected]>
Date:   Mon Oct 8 19:53:39 2018 -0500

    successfully round-trip kms protected seed value

commit a072d3c
Author: Stuart Stock <[email protected]>
Date:   Sun Oct 7 21:44:53 2018 -0500

    wip checkpoint; nearly round-trip kms

commit f6b5c2c
Author: Stuart Stock <[email protected]>
Date:   Sun Oct 7 15:14:01 2018 -0500

    checkpoint

commit 73bff43
Author: Stuart Stock <[email protected]>
Date:   Sun Oct 7 09:52:50 2018 -0500

    start work on envelope encryption for long-term seed

commit 0b924cc
Author: Stuart Stock <[email protected]>
Date:   Sat Oct 6 22:40:12 2018 -0500

    Land KMS support, yay!

    AWS KMS for now, work-in-progress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants