Skip to content
Merged
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
53 changes: 45 additions & 8 deletions .github/actions/analysis/afl-fuzz/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: BSD-3-Clause
#
name: 'AFL Fuzz'
description: 'Build and run AFL++ fuzzing for config parser harness'
description: 'Build and run AFL++ fuzzing for transmitter and receiver config parsers'

inputs:
max-seconds:
Expand All @@ -19,7 +19,7 @@ runs:
shell: bash
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq afl++ libavutil-dev libavformat-dev libavcodec-dev libswscale-dev pkg-config
sudo apt-get install -y -qq afl++ libavutil-dev libavformat-dev libavcodec-dev libswscale-dev libjson-c-dev zlib1g-dev pkg-config

- name: Verify AFL environment
shell: bash
Expand All @@ -40,20 +40,27 @@ runs:
- name: Build AFL fuzz harness
shell: bash
run: |
cd fuzz
cd dvledtx/fuzz
export CC=afl-clang-fast
$CC -g -O1 -fno-omit-frame-pointer -I../include -c fuzz_config_reader.c -o fuzz_config_reader.o
$CC -g -O1 -fno-omit-frame-pointer -I../include -c ../src/util/config_reader.c -o config_reader.o
$CC -g -O1 -fno-omit-frame-pointer -I../include -c ../src/util/logger.c -o logger.o
$CC -o fuzz_config_reader fuzz_config_reader.o config_reader.o logger.o -lavutil -lm
echo "Build successful: $(file fuzz_config_reader)"

cd ../../dvledrx/fuzz
$CC -g -O1 -fno-omit-frame-pointer -I../include \
fuzz_config_reader.c ../src/config_reader.c ../src/logger.c \
-pthread $(pkg-config --cflags --libs json-c zlib) \
-o fuzz_config_reader
echo "Receiver build successful: $(file fuzz_config_reader)"

- name: Run AFL fuzzer
shell: bash
env:
MAX_SECONDS: ${{ inputs.max-seconds }}
run: |
cd fuzz
cd dvledtx/fuzz
if ! [[ "$MAX_SECONDS" =~ ^[0-9]+$ ]]; then
echo "ERROR: max-seconds must be a positive integer"
exit 1
Expand All @@ -66,7 +73,7 @@ runs:
- name: Check AFL crashes
shell: bash
run: |
cd fuzz
cd dvledtx/fuzz
CRASH_COUNT=$(find findings/default/crashes -type f ! -name "README.txt" 2>/dev/null | wc -l)
echo "Crashes found: $CRASH_COUNT"
if [ "$CRASH_COUNT" -gt 0 ]; then
Expand All @@ -76,11 +83,41 @@ runs:
fi
echo "No crashes found - fuzzing passed."

- name: Run receiver AFL fuzzer
shell: bash
env:
MAX_SECONDS: ${{ inputs.max-seconds }}
run: |
cd dvledrx/fuzz
if ! [[ "$MAX_SECONDS" =~ ^[0-9]+$ ]]; then
echo "ERROR: max-seconds must be a positive integer"
exit 1
fi
mkdir -p findings
export AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES=1
export AFL_SKIP_CPUFREQ=1
timeout "$MAX_SECONDS" afl-fuzz -i corpus/ -o findings/ -V "$MAX_SECONDS" -- ./fuzz_config_reader @@ || true

- name: Check receiver AFL crashes
shell: bash
run: |
cd dvledrx/fuzz
CRASH_COUNT=$(find findings/default/crashes -type f ! -name "README.txt" 2>/dev/null | wc -l)
echo "Receiver crashes found: $CRASH_COUNT"
if [ "$CRASH_COUNT" -gt 0 ]; then
echo "::error::AFL found $CRASH_COUNT receiver crash(es)!"
ls -la findings/default/crashes/
exit 1
fi
echo "No receiver crashes found - fuzzing passed."

- name: Sanitize AFL filenames
if: always()
shell: bash
run: |
cd fuzz/findings
find . -name '*:*' | while read -r f; do
mv "$f" "$(echo "$f" | tr ':' '_')"
for FINDINGS_DIR in dvledtx/fuzz/findings dvledrx/fuzz/findings; do
[ -d "$FINDINGS_DIR" ] || continue
find "$FINDINGS_DIR" -name '*:*' -print0 | while IFS= read -r -d '' f; do
mv "$f" "$(echo "$f" | tr ':' '_')"
done
done
6 changes: 3 additions & 3 deletions .github/actions/analysis/checksec/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: BSD-3-Clause
#
name: 'checksec Analysis'
description: 'Run checksec static hardening analysis on dvledtx binaries'
description: 'Run checksec static hardening analysis on dvledtx and dvledrx binaries'

runs:
using: composite
Expand Down Expand Up @@ -40,7 +40,7 @@ runs:
echo "=================================================="
echo " checksec � Binary Hardening Analysis"
echo "=================================================="
for BIN in bins/dvledtx bins/dvledtx-mtl; do
for BIN in bins/dvledtx bins/dvledtx-mtl bins/dvledrx; do
if [ -f "$BIN" ]; then
echo ""
echo "--- $BIN ---"
Expand All @@ -59,7 +59,7 @@ runs:
run: |
REPORT_DIR="$GITHUB_WORKSPACE/reports"
mkdir -p "$REPORT_DIR"
for BIN in bins/dvledtx bins/dvledtx-mtl; do
for BIN in bins/dvledtx bins/dvledtx-mtl bins/dvledrx; do
if [ -f "$BIN" ]; then
LABEL=$(basename "$BIN")
checksec --no-banner file -o json "$BIN" 2>/dev/null \
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/analysis/codeql/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: BSD-3-Clause
#
name: 'CodeQL Scan'
description: 'Initialize CodeQL, build dvledtx, and perform CodeQL analysis for C/C++'
description: 'Initialize CodeQL, build dvledtx and dvledrx, and perform CodeQL analysis for C/C++'

runs:
using: composite
Expand All @@ -16,7 +16,7 @@ runs:
build-mode: manual

# c-cpp requires a manual build so CodeQL can trace the meson/ninja compiler invocations.
- name: Build dvledtx
- name: Build applications
uses: $/.github/actions/build-dvledtx

- name: Perform CodeQL Analysis
Expand Down
3 changes: 2 additions & 1 deletion .github/actions/analysis/cppcheck/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ runs:
--enable=warning,style,performance,portability \
--std=c11 --force --inline-suppr \
--suppress=missingIncludeSystem \
-Iinclude src 2>&1 | tee "$REPORT_DIR/cppcheck-report.txt" || true
-Idvledtx/include -Idvledrx/include \
dvledtx/src dvledrx/src 2>&1 | tee "$REPORT_DIR/cppcheck-report.txt" || true
echo "cppcheck scan complete. Report: $REPORT_DIR/cppcheck-report.txt"
64 changes: 60 additions & 4 deletions .github/actions/analysis/libfuzzer/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: BSD-3-Clause
#
name: 'libFuzzer'
description: 'Build and run libFuzzer with ASan and UBSan for config parser harness'
description: 'Build and run libFuzzer with ASan and UBSan for transmitter and receiver config parsers'

inputs:
max-seconds:
Expand All @@ -19,7 +19,7 @@ runs:
shell: bash
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq clang libavutil-dev libavformat-dev libavcodec-dev libswscale-dev pkg-config
sudo apt-get install -y -qq clang libavutil-dev libavformat-dev libavcodec-dev libswscale-dev libjson-c-dev zlib1g-dev pkg-config

- name: Build and run libFuzzer (ASan)
shell: bash
Expand All @@ -30,7 +30,7 @@ runs:
echo "ERROR: max-seconds must be a positive integer"
exit 1
fi
cd fuzz
cd dvledtx/fuzz
export CC=clang
$CC -fsanitize=fuzzer,address -g -O1 -fno-omit-frame-pointer -I../include \
fuzz_config_reader_libfuzzer.c \
Expand Down Expand Up @@ -58,7 +58,7 @@ runs:
echo "ERROR: max-seconds must be a positive integer"
exit 1
fi
cd fuzz
cd dvledtx/fuzz
export CC=clang
$CC -fsanitize=fuzzer,undefined -g -O1 -fno-omit-frame-pointer -I../include \
fuzz_config_reader_libfuzzer.c \
Expand All @@ -76,3 +76,59 @@ runs:
echo "::error::libFuzzer+UBSan found an issue (exit code $FUZZ_EXIT)!"
exit 1
fi

- name: Build and run receiver libFuzzer (ASan)
shell: bash
env:
MAX_SECONDS: ${{ inputs.max-seconds }}
run: |
if ! [[ "$MAX_SECONDS" =~ ^[0-9]+$ ]]; then
echo "ERROR: max-seconds must be a positive integer"
exit 1
fi
cd dvledrx/fuzz
export CC=clang
$CC -fsanitize=fuzzer,address -g -O1 -fno-omit-frame-pointer -I../include \
fuzz_config_reader_libfuzzer.c \
../src/config_reader.c \
../src/logger.c \
-pthread -o fuzz_config_reader_libfuzzer \
$(pkg-config --cflags --libs json-c zlib)

mkdir -p libfuzzer_corpus
./fuzz_config_reader_libfuzzer \
libfuzzer_corpus/ corpus/ \
-max_total_time="$MAX_SECONDS" \
-print_final_stats=1 || FUZZ_EXIT=$?
if [ "${FUZZ_EXIT:-0}" -ne 0 ]; then
echo "::error::Receiver libFuzzer+ASan found an issue (exit code $FUZZ_EXIT)!"
exit 1
fi

- name: Build and run receiver libFuzzer (UBSan)
shell: bash
env:
MAX_SECONDS: ${{ inputs.max-seconds }}
run: |
if ! [[ "$MAX_SECONDS" =~ ^[0-9]+$ ]]; then
echo "ERROR: max-seconds must be a positive integer"
exit 1
fi
cd dvledrx/fuzz
export CC=clang
$CC -fsanitize=fuzzer,undefined -g -O1 -fno-omit-frame-pointer -I../include \
fuzz_config_reader_libfuzzer.c \
../src/config_reader.c \
../src/logger.c \
-pthread -o fuzz_config_reader_ubsan \
$(pkg-config --cflags --libs json-c zlib)

mkdir -p ubsan_corpus
./fuzz_config_reader_ubsan \
ubsan_corpus/ corpus/ \
-max_total_time="$MAX_SECONDS" \
-print_final_stats=1 || FUZZ_EXIT=$?
if [ "${FUZZ_EXIT:-0}" -ne 0 ]; then
echo "::error::Receiver libFuzzer+UBSan found an issue (exit code $FUZZ_EXIT)!"
exit 1
fi
22 changes: 16 additions & 6 deletions .github/actions/build-dvledtx/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Copyright (C) 2026 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause
#
name: 'Build dvledtx'
description: 'Build dvledtx with FFMPEG and MTL TX APIs, keep both binaries'
name: 'Build dvledtx and dvledrx'
description: 'Build both applications with FFMPEG and MTL TX APIs'

runs:
using: composite
Expand All @@ -14,23 +14,33 @@ runs:
run: |
echo "===== Build: FFMPEG TX APIs ====="
./scripts/build.sh
if [ ! -f "./build/dvledtx" ]; then
if [ ! -f "./build/dvledtx/dvledtx" ]; then
echo "ERROR: dvledtx not found after FFMPEG build!"
exit 1
fi
if [ ! -f "./build/dvledrx/dvledrx" ]; then
echo "ERROR: dvledrx not found after FFMPEG build!"
exit 1
fi
mkdir -p ./bins
cp ./build/dvledtx ./bins/dvledtx
cp ./build/dvledtx/dvledtx ./bins/dvledtx
cp ./build/dvledrx/dvledrx ./bins/dvledrx
echo "FFMPEG build saved: $(file ./bins/dvledtx)"
echo "Receiver build saved: $(file ./bins/dvledrx)"

- name: Build with MTL TX APIs
shell: bash
run: |
echo "===== Build: MTL TX APIs ====="
./scripts/build.sh -Denable_mtl_tx=true
if [ ! -f "./build/dvledtx" ]; then
if [ ! -f "./build/dvledtx/dvledtx" ]; then
echo "ERROR: dvledtx not found after MTL build!"
exit 1
fi
if [ ! -f "./build/dvledrx/dvledrx" ]; then
echo "ERROR: dvledrx not found after MTL build!"
exit 1
fi
mkdir -p ./bins
cp ./build/dvledtx ./bins/dvledtx-mtl
cp ./build/dvledtx/dvledtx ./bins/dvledtx-mtl
echo "MTL build saved: $(file ./bins/dvledtx-mtl)"
8 changes: 4 additions & 4 deletions .github/actions/environment-check/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ inputs:
dpdk-version:
description: 'DPDK version to build'
required: false
default: '25.11'
default: '26.07'
mtl-commit:
description: 'MTL commit ID to build'
required: false
default: '7bee24231c864d12da6db2c2ffbfd3986717af5a'
default: '9762c314ed24bd628d3f808b95a94c3aa8525723'
ffmpeg-version:
description: 'FFmpeg release branch to build'
required: false
Expand All @@ -25,7 +25,7 @@ inputs:
cached environment (e.g. new APT packages needed by the FFmpeg build)
so runners rebuild instead of restoring a stale cache.
required: false
default: '2'
default: '3'

runs:
using: composite
Expand Down Expand Up @@ -111,7 +111,7 @@ runs:
shell: bash
run: |
echo "===== APT Package Setup ====="
PKGS="git gcc meson python3 python3-pip pkg-config libnuma-dev libjson-c-dev libpcap-dev libgtest-dev libssl-dev systemtap-sdt-dev llvm clang flex byacc libcmocka-dev nasm wget patch unzip shellcheck cppcheck libx11-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev"
PKGS="git gcc meson python3 python3-pip pkg-config libnuma-dev libjson-c-dev libpcap-dev libgtest-dev libssl-dev systemtap-sdt-dev llvm clang flex byacc libcmocka-dev nasm wget patch unzip shellcheck cppcheck libx11-dev libxext-dev libxrandr-dev zlib1g-dev xvfb xauth libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev"
MISSING=""
for pkg in $PKGS; do
if dpkg -s "$pkg" &>/dev/null; then
Expand Down
12 changes: 8 additions & 4 deletions .github/actions/smoke-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: BSD-3-Clause
#
name: 'Smoke Tests'
description: 'Run smoke tests on dvledtx and dvledtx-mtl binaries. Results written to $GITHUB_WORKSPACE/reports/'
description: 'Run smoke tests on dvledtx and dvledrx binaries. Results written to $GITHUB_WORKSPACE/reports/'

runs:
using: composite
Expand All @@ -15,15 +15,19 @@ runs:
REPORT_DIR="$GITHUB_WORKSPACE/reports"
mkdir -p "$REPORT_DIR"

for BINARY in ./bins/dvledtx ./bins/dvledtx-mtl; do
for BINARY in ./bins/dvledtx ./bins/dvledtx-mtl ./bins/dvledrx; do
NAME=$(basename "$BINARY")
echo "===== Smoke Test: $NAME ====="
OUTFILE="$REPORT_DIR/smoke-test-${NAME}.txt"

# version check
VERSION_OUTPUT=$(timeout 5s "$BINARY" -v 2>&1)
if ! echo "$VERSION_OUTPUT" | grep -qE "^dvledtx version [0-9]+\.[0-9]+\.[0-9]+"; then
echo "ERROR: $NAME -v output did not match expected format 'dvledtx version X.Y.Z'"
VERSION_PREFIX=dvledtx
if [ "$NAME" = "dvledrx" ]; then
VERSION_PREFIX=dvledrx
fi
if ! echo "$VERSION_OUTPUT" | grep -qE "^${VERSION_PREFIX} version [0-9]+\.[0-9]+\.[0-9]+"; then
echo "ERROR: $NAME -v output did not match expected format '${VERSION_PREFIX} version X.Y.Z'"
echo "Got: $VERSION_OUTPUT"
exit 1
fi
Expand Down
Loading
Loading