upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authormtg0001 <106211915+mtg0001@users.noreply.github.com>2026-08-04 15:31:55 -0300
committerGitHub <noreply@github.com>2026-08-04 15:31:55 -0300
commitb3a5a858e536acf65e6c6761293626628f2227bf (patch)
tree881dbe44ac6c0ea28f5a65cbfd9b835ba73ea648 /Makefile
parent173b4649e90f4f5ba49e92569eb063709e647c7d (diff)
fuzz: add P2P message parser harness (#142)
* fuzz: add P2P message parser harness * fuzz: avoid duplicate legacy header includes * fuzz: seed the corpus with our network magic, not Bitcoin's The two seed inputs began f5 be b6 d9, which is Bitcoin's message start. Ours is bf 20 5c fd. CMessageHeader::IsValid rejects on that field first, so both seeds died at the first check and the smoke run exercised the reject path and nothing else. libFuzzer would have to mutate its way onto four exact bytes before reaching any parser, which does not happen in 128 runs. The job would have gone green while covering none of what it was added to cover. --------- Co-authored-by: Gilcimar Duarte <ti@gpm.infra> Co-authored-by: Bitflash-sh <btf01@proton.me>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 0788b61..736f5d8 100644
--- a/Makefile
+++ b/Makefile
@@ -42,7 +42,7 @@ deps-apt:
42 @if command -v apt-get >/dev/null 2>&1; then \ 42 @if command -v apt-get >/dev/null 2>&1; then \
43 $(SUDO) apt-get install -y build-essential cmake git pkg-config autoconf \ 43 $(SUDO) apt-get install -y build-essential cmake git pkg-config autoconf \
44 libtool libssl-dev libdb5.3++-dev libsodium-dev nlohmann-json3-dev \ 44 libtool libssl-dev libdb5.3++-dev libsodium-dev nlohmann-json3-dev \
45 libboost-system-dev libglfw3-dev libgl-dev python3-pil; \ 45 libboost-system-dev libglfw3-dev libgl-dev python3-pil clang; \
46 else \ 46 else \
47 echo "Not an apt system — install: g++ cmake git autoconf libtool"; \ 47 echo "Not an apt system — install: g++ cmake git autoconf libtool"; \
48 echo " libssl libdb++ libsodium nlohmann-json boost glfw3 opengl python3-pil"; \ 48 echo " libssl libdb++ libsodium nlohmann-json boost glfw3 opengl python3-pil"; \
@@ -191,6 +191,9 @@ clean:
191tests: 191tests:
192 $(MAKE) -C src -f Makefile tests 192 $(MAKE) -C src -f Makefile tests
193 193
194fuzz-net-message-smoke: deps-linux
195 $(MAKE) -C src -f Makefile fuzz-net-message-smoke
196
194checksums: 197checksums:
195 ./scripts/make-release-checksums.sh 198 ./scripts/make-release-checksums.sh
196 199
@@ -201,5 +204,5 @@ verify-release:
201 ./scripts/verify-release.sh $(if $(TAG),$(TAG),latest) 204 ./scripts/verify-release.sh $(if $(TAG),$(TAG),latest)
202 205
203.PHONY: linux windows clean appimage \ 206.PHONY: linux windows clean appimage \
204 tests checksums sign-checksums verify-release \ 207 tests fuzz-net-message-smoke checksums sign-checksums verify-release \
205 deps-linux deps-windows deps-apt deps-secp256k1 deps-randomx 208 deps-linux deps-windows deps-apt deps-secp256k1 deps-randomx