GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - sefcom/CPython-AST-Fuzzer: A toy project for Python interpreter fuzzing using AST mutators based on LibFuzzer

BranchesTags
Open more actions menu

Latest commit

 

History

70 Commits
70 Commits

Folders and files

NameName
Last commit message
Last commit date
scripts
scripts
 
 
src
src
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
atheris-nix-bash.patch
atheris-nix-bash.patch
 
 
build.sh
build.sh
 
 
check.sh
check.sh
 
 
gen_hints.sh
gen_hints.sh
 
 
main.sh
main.sh
 
 
pipline.md
pipline.md
 
 
readme.md
readme.md
 
 

Repository files navigation

pyFuzzer

A toy project for Python interpreter fuzzing using AST-base mutators, based on LibFuzzer.
Started in SEFCOM.

My other work: CPython Grammar Fuzzer

Requirements

  • nix-shell
  • git for pulling source code
  • python for code generation

How to build

./build.sh

arguments:

  • -p / --cpython forces to re-clone, re-patch and rebuild CPython
  • -f / --force forces to re-generate all codgen codes, re-configure cmake and build
  • --clear remove all cache directories
  • -j <core> / --jobs <core> equivalent to make -j<core>

How to run

./main.sh

arguments:

  • -c / --clean removing all log directories
  • -d / --debug using stdout instead of redirecting into log file
  • --cov generate coverage report using llvm-cov
  • -r <turns> / --runs <turns> equivalent to libFuzzer -runs=<turns>
  • -l / --last-case load most recent corpus saved under log folder as dummy AST instead of plain AST.

Executing every known crash

./check.sh

Type hints for VScode

./gen_hints.sh

Designing

pipline.md
For mutators list, check mutators.h.
My goal is to recover and find more similar bugs like the motivation samples in pipline.md.

TODO

  • Using Atheris to extend target modules from only builtin to others (Atheris only support Python <= 3.11 so far)
  • Free useless ASTs in appropriate time
  • Add more guide to mutator picking instead of pure randomness
  • More mutator, more performance
  • Automatically document parse
  • is there any way to enable Corpus?
  • More depth(it's only 2 rn)
  • Multi-inherit class support(risk at conflicted class)

About

A toy project for Python interpreter fuzzing using AST mutators based on LibFuzzer

Topics

cpythonlibfuzzer

Resources

Readme
MIT license
Activity
Custom properties

Stars

4 stars

Watchers

1 watching

Forks

2 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.