Code Monkey home page Code Monkey logo

drshadowstack's People

Contributors

zwimer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

drshadowstack's Issues

Create a wiki

Pages:
- Home
- Internal Shadow Stack
- External Shadow Stack
- Developers
- When does this fail
- Exceptions made
- FAQ

__longjmp_chk exception

This project promises nothing on longjmp, but many applications do use it. Perhaps if a shadow stack mismatch occurs, and the longjmp symbol is matched via symbol resolution, simply pop the shadow stack until the desired return address is found (the one written when setjmp was called)

Unit tests

Unit tests are a must! Maybe use cmake's test suite?

Retpoline fix?

After spectre and meltdown, the retpoline fix was released. Intel CET does not play well with it, can an exception to the shadow stack be made to handle this?

Logging information typo

The logging info will show something like:
Call(0x40600)
Ret(0x40600)

When really it should say
Call - Return to(0x40600)
Ret(0x40600)

Handle signals

When a signal handler is called, no 'call' is used as it is called via the kernel. A ret, however, is called. Add an exception, maybe a wildcard match?

exec - clear shadow stack

On forking, the shadow stack is not cleared (correct). If the process then execs, the stack still does not clear (bad). This probably doesn't pose a threat, but just in case it should be fixed

Automate doc generation

On commit or merge, doyxygen, github_changelog_generator -u zwimer -p DrShadowStack, and clang-format -i -style=file ./src/*pp

Argument parser ignores flags of the sub shell

Running:
./DrShadowStack.out -m ext -d ~/dynamorio/build/bin64/drrun ls -la

Log produces:
Calling execvp on: /home/vagrant/dynamorio/build/bin64/drrun -c /home/vagrant/ShadowStack/src/build/libss_dr_client.so ext /tmp/5VvB7lZNYELIKuNauM -- ls

Log file bug for non-debug mode

Running in non-debug mode gives:

ERROR: fopen() failed.
Message from strerror: Bad address

This probably has to do with trying to open null

Add a version

Maybe a file or something? The --version flag should work!

Symbol Resolution on error

If a shadow stack mismatch is detected, do not simply print the hex addresses, attempt to resolve the symbols to give the function name and other information about the symbol. This is useful for debugging, and only needs to be done for the internal shadow stack (where it makes sense).

Enable basic threading for the external SS

Either hook syscalls (and check clone's arguments since fork() utilizes clone too) or look for an event. Note: dr's fork event is called only by the child process after the fork has occurred

Remap signals

Make sure not to remap ones that are by default ignored.
Don't try for SIGKILL or SIGSTOP, they will fail

Create Utilities

Wrap common functions up to protect the global namespace and enforce uniformity in handling common cases

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.