Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions infra/experimental/SystemSan/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
CXX = clang++
CFLAGS = -std=c++17 -Wall -Wextra -O3 -g3 -Werror

define test_fuzzer
timeout 20s ./SystemSan './$(1)' -dict=vuln.dict 2>&1 | grep -q --text '===BUG DETECTED: $(2)==='
endef

all: SystemSan target target_file target_dns

SystemSan: SystemSan.cpp inspect_dns.cpp inspect_utils.cpp
Expand All @@ -21,18 +25,18 @@ target_dns: target_dns.cpp
$(CXX) $(CFLAGS) -fsanitize=address,fuzzer -o $@ $^

test: all vuln.dict
./SystemSan ./target -dict=vuln.dict
./SystemSan ./target_file -dict=vuln.dict
./SystemSan ./target_dns -dict=vuln.dict
$(call test_fuzzer,target,Shell corruption)
$(call test_fuzzer,target_dns,Arbitrary domain name resolution)
$(call test_fuzzer,target_file,Arbitrary file open)

pytorch-lightning-1.5.10:
cp SystemSan.cpp PoEs/pytorch-lightning-1.5.10/; \
cp SystemSan.cpp inspect_*.* PoEs/pytorch-lightning-1.5.10/; \
cd PoEs/pytorch-lightning-1.5.10/; \
docker build . --tag syssan_pytorch-lightning; \
docker run -t systemsan_pytorch-lightning:latest;
docker build . --tag systemsan_pytorch-lightning; \
docker run -it systemsan_pytorch-lightning:latest;

node-shell-quote-v1.7.3:
cp SystemSan.cpp PoEs/node-shell-quote-v1.7.3/; \
cp SystemSan.cpp inspect_*.* PoEs/node-shell-quote-v1.7.3/; \
cd PoEs/node-shell-quote-v1.7.3/; \
docker build . --tag systemsan_node-shell-quote; \
docker run -t systemsan_node-shell-quote:latest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ RUN apt update && \
vim \
npm && \
git clone \
--depth 1 \
https://github.com/substack/node-shell-quote.git && \
https://github.com/ljharb/node-shell-quote.git && \
cd node-shell-quote && \
# v1.7.3 is not tagged anymore
git reset --hard 6a8a899c62a58a30fb128a7079f02826ed4faee0 && \
npm config set @gitlab-org:registry \
https://gitlab.com/api/v4/packages/npm/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
CXX = clang++
CFLAGS = -std=c++17 -Wall -Wextra -O3 -g3

SystemSan: SystemSan.cpp
SystemSan: SystemSan.cpp inspect_dns.cpp inspect_utils.cpp
$(CXX) $(CFLAGS) -lpthread -o $@ $^

run: clean SystemSan target.js
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ RUN apt update && \
git clone \
--depth 1 \
--branch 1.5.10 \
https://github.com/PyTorchLightning/pytorch-lightning.git
https://github.com/Lightning-AI/lightning.git

COPY ./build.sh $SRC
RUN ./build.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
CXX = clang++
CFLAGS = -std=c++17 -Wall -Wextra -O3 -g3

SystemSan: SystemSan.cpp
SystemSan: SystemSan.cpp inspect_dns.cpp inspect_utils.cpp
$(CXX) $(CFLAGS) -lpthread -o $@ $^

run: clean SystemSan fuzz_pytorch_lightning.py
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,45 @@
################################################################################

# Build and install project (using current CFLAGS, CXXFLAGS).
cd pytorch-lightning
cd lightning
git apply <<EOF
diff --git a/requirements.txt b/requirements.txt
index dd34e9273..36f55e683 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,7 +1,7 @@
# the default package dependencies

numpy>=1.17.2
-torch>=1.7.*
+torch>=1.7.1
future>=0.17.1 # required for builtins in setup.py
tqdm>=4.41.0
PyYAML>=5.1
diff --git a/requirements/examples.txt b/requirements/examples.txt
index 8591f9bd5..8c0d96bd1 100644
--- a/requirements/examples.txt
+++ b/requirements/examples.txt
@@ -1,3 +1,3 @@
-torchvision>=0.8.*
+torchvision>=0.8.2
gym>=0.17.0
ipython[all]
diff --git a/requirements/extra.txt b/requirements/extra.txt
index 74743185e..52580b475 100644
--- a/requirements/extra.txt
+++ b/requirements/extra.txt
@@ -2,7 +2,7 @@

matplotlib>3.1
horovod>=0.21.2 # no need to install with [pytorch] as pytorch is already installed
-torchtext>=0.8.*
+torchtext>=0.8.1
omegaconf>=2.0.5
hydra-core>=1.0.5
jsonargparse[signatures]>=4.0.4,<5.0.0
EOF
pip3 install --upgrade pip
pip3 install .

# Build fuzzers in $OUT.
Expand Down