@@ -45,17 +45,19 @@ jobs:
4545 fi
4646 - name : verify
4747 run : |
48- file payload exploit exploit-passwd
48+ file payload exploit exploit-passwd vulnerable
4949 echo "payload: $(stat -c%s payload) bytes"
5050 echo "exploit: $(stat -c%s exploit) bytes"
5151 echo "exploit-passwd: $(stat -c%s exploit-passwd) bytes"
52+ echo "vulnerable: $(stat -c%s vulnerable) bytes"
5253 - name : upload binaries
5354 uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
5455 with :
5556 name : copy-fail-c-${{ matrix.target.arch }}-glibc
5657 path : |
5758 exploit
5859 exploit-passwd
60+ vulnerable
5961 retention-days : 90
6062
6163 # zig cc + musl-static. Produces deploy-anywhere binaries with a fully
@@ -109,25 +111,27 @@ jobs:
109111 if [ -n "$LD_PREFIX" ]; then
110112 STRIP="${LD_PREFIX}-strip"
111113 fi
112- for bin in exploit exploit-passwd; do
114+ for bin in exploit exploit-passwd vulnerable ; do
113115 BEFORE=$(stat -c%s "$bin")
114116 "$STRIP" --strip-all "$bin"
115117 AFTER=$(stat -c%s "$bin")
116118 echo "$bin stripped: $BEFORE -> $AFTER bytes"
117119 done
118120 - name : verify
119121 run : |
120- file payload exploit exploit-passwd
122+ file payload exploit exploit-passwd vulnerable
121123 echo "payload: $(stat -c%s payload) bytes"
122124 echo "exploit: $(stat -c%s exploit) bytes"
123125 echo "exploit-passwd: $(stat -c%s exploit-passwd) bytes"
126+ echo "vulnerable: $(stat -c%s vulnerable) bytes"
124127 - name : upload binaries
125128 uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
126129 with :
127130 name : copy-fail-c-${{ matrix.target.arch }}-musl
128131 path : |
129132 exploit
130133 exploit-passwd
134+ vulnerable
131135 retention-days : 90
132136
133137 release :
@@ -150,9 +154,11 @@ jobs:
150154 for d in artifacts/copy-fail-c-*; do
151155 base=$(basename "$d")
152156 passwd_name="${base/copy-fail-c-/copy-fail-c-passwd-}"
157+ vulnerable_name="${base/copy-fail-c-/copy-fail-c-vulnerable-}"
153158 cp "$d/exploit" "release/$base"
154159 cp "$d/exploit-passwd" "release/$passwd_name"
155- chmod +x "release/$base" "release/$passwd_name"
160+ cp "$d/vulnerable" "release/$vulnerable_name"
161+ chmod +x "release/$base" "release/$passwd_name" "release/$vulnerable_name"
156162 done
157163 ls -la release/
158164 - name : create release
@@ -182,6 +188,14 @@ jobs:
182188 Works where the binary-mutation route is blocked but has a
183189 narrower cashout surface; see README for details.
184190
191+ Detection (non-destructive):
192+
193+ * \`copy-fail-c-vulnerable-<arch>-<libc>\`: vulnerability checker.
194+ Creates a local testfile and runs the AF_ALG/splice primitive
195+ against its own page cache to detect kernel susceptibility,
196+ without touching any system file. Runs unprivileged. Exits 100
197+ if vulnerable, 0 otherwise.
198+
185199 Build modes:
186200
187201 * \`-glibc\` builds: GNU cross-toolchain, glibc-static. Larger (~800 KB)
0 commit comments