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
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
# https://apt.llvm.org/bookworm/dists/
# https://apt.llvm.org/trixie/dists/
llvm-version:
# TODO: add 14 to ensure support for Ubuntu 22.04. LLVM doesn't build
# 14 for Bookworm, so we could switch to Bullseye, or use some other
# 14 for Trixie, so we could switch to Bullseye, or use some other
# means of testing against LLVM 14. We've manually confirmed 14 works,
# but having automated tests would ensure compatibility as development
# continues. Tracking upstream request here:
Expand All @@ -27,6 +27,7 @@ jobs:
- "19"
- "20"
- "21"
- "22"
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand Down
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# https://hub.docker.com/_/ruby
ARG RUBY_VERSION=4.0

FROM ruby:$RUBY_VERSION-slim-bookworm
FROM ruby:$RUBY_VERSION-slim-trixie

RUN apt update && apt install -y \
ca-certificates \
wget \
&& rm -rf /var/lib/apt/lists/*

# LLVM builds version 15-21 for Debian 12 (Bookworm)
# https://apt.llvm.org/bookworm/dists/
ARG LLVM_VERSION=21
# LLVM builds version 15-22 for Debian 13 (Trixie)
# https://apt.llvm.org/trixie/dists/
ARG LLVM_VERSION=22

RUN echo "deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-$LLVM_VERSION main" > /etc/apt/sources.list.d/llvm.list
RUN echo "deb-src http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-$LLVM_VERSION main" >> /etc/apt/sources.list.d/llvm.list
RUN echo "deb http://apt.llvm.org/trixie/ llvm-toolchain-trixie-$LLVM_VERSION main" > /etc/apt/sources.list.d/llvm.list
RUN echo "deb-src http://apt.llvm.org/trixie/ llvm-toolchain-trixie-$LLVM_VERSION main" >> /etc/apt/sources.list.d/llvm.list
RUN wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key > /etc/apt/trusted.gpg.d/apt.llvm.org.asc

RUN apt update && apt install -y \
Expand Down
14 changes: 7 additions & 7 deletions Dockerfile.LibAFL
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Stage 1: Build LibAFL's libFuzzer compatibility library
ARG RUBY_VERSION=4.0
ARG LLVM_VERSION=21
ARG LLVM_VERSION=22

FROM debian:bookworm-slim AS libafl-builder
FROM debian:trixie-slim AS libafl-builder

ARG LLVM_VERSION

Expand All @@ -14,8 +14,8 @@ RUN apt update && apt install -y \
&& rm -rf /var/lib/apt/lists/*

# Install LLVM (needed for clang linker during Rust build)
RUN echo "deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-$LLVM_VERSION main" > /etc/apt/sources.list.d/llvm.list \
&& echo "deb-src http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-$LLVM_VERSION main" >> /etc/apt/sources.list.d/llvm.list \
RUN echo "deb http://apt.llvm.org/trixie/ llvm-toolchain-trixie-$LLVM_VERSION main" > /etc/apt/sources.list.d/llvm.list \
&& echo "deb-src http://apt.llvm.org/trixie/ llvm-toolchain-trixie-$LLVM_VERSION main" >> /etc/apt/sources.list.d/llvm.list \
&& wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key > /etc/apt/trusted.gpg.d/apt.llvm.org.asc \
&& apt update && apt install -y \
clang-$LLVM_VERSION \
Expand All @@ -41,7 +41,7 @@ ENV LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
RUN bash build.sh

# Stage 2: Build ruzzy with LibAFL's libFuzzer
FROM ruby:$RUBY_VERSION-slim-bookworm
FROM ruby:$RUBY_VERSION-slim-trixie

RUN apt update && apt install -y \
ca-certificates \
Expand All @@ -50,8 +50,8 @@ RUN apt update && apt install -y \

ARG LLVM_VERSION

RUN echo "deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-$LLVM_VERSION main" > /etc/apt/sources.list.d/llvm.list \
&& echo "deb-src http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-$LLVM_VERSION main" >> /etc/apt/sources.list.d/llvm.list \
RUN echo "deb http://apt.llvm.org/trixie/ llvm-toolchain-trixie-$LLVM_VERSION main" > /etc/apt/sources.list.d/llvm.list \
&& echo "deb-src http://apt.llvm.org/trixie/ llvm-toolchain-trixie-$LLVM_VERSION main" >> /etc/apt/sources.list.d/llvm.list \
&& wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key > /etc/apt/trusted.gpg.d/apt.llvm.org.asc

# Install lld alongside clang. LibAFL's libFuzzer.a contains a .preinit_array
Expand Down
Loading