Lua is a powerful, efficient, lightweight, embeddable scripting language. Lua is dynamically typed, runs by interpreting bytecode with a register-based virtual machine, and has automatic memory management with incremental garbage collection, making it ideal for configuration, scripting, and rapid prototyping. Lua is designed, implemented, and maintained by a team at PUC-Rio, the Pontifical Catholic University of Rio de Janeiro in Brazil.
$ sudo docker build -t oss-sydr-fuzz-lua .
Unzip Sydr (sydr.zip
) in projects/lua
directory:
$ unzip sydr.zip
Run docker:
$ sudo docker run --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v /etc/localtime:/etc/localtime:ro --rm -it -v $PWD:/fuzz oss-sydr-fuzz-lua /bin/bash
Change directory to /fuzz
:
# cd /fuzz
Run hybrid fuzzing:
# sydr-fuzz -c luaL_loadstring.toml run
Corpus minimization (step is required for AFL++):
sydr-fuzz -c luaL_loadstring.toml cmin
Collect and report coverage:
# sydr-fuzz -c luaL_loadstring.toml cov-report
Building HTML report:
$ sydr-fuzz -c luaL_loadstring.toml cov-show -- -format=html > index.html
# sydr-fuzz -c luaL_loadstring-afl++.toml run
Lua project has 13 fuzz targets.
# sydr-fuzz -c lua_dump.toml run
# sydr-fuzz -c luaL_addgsub.toml run
# sydr-fuzz -c luaL_buffaddr.toml run
# sydr-fuzz -c luaL_bufflen.toml run
# sydr-fuzz -c luaL_buffsub.toml run
# sydr-fuzz -c luaL_dostring.toml run
# sydr-fuzz -c luaL_gsub.toml run
# sydr-fuzz -c luaL_loadbuffer.toml run
# sydr-fuzz -c luaL_loadbuffer_proto.toml run
# sydr-fuzz -c luaL_loadbufferx.toml run
# sydr-fuzz -c luaL_loadstring.toml run
# sydr-fuzz -c lua_load.toml run
# sydr-fuzz -c luaL_traceback.toml run
# sydr-fuzz -c lua_stringtonumber.toml run