public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] main: kernel/CVE-2026-99064: avoid binary file
@ 2026-11-12  8:21 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-11-12  8:21 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : main
            Commit : f337997540d0753dff354af30336918cd3b14e93
            Author : Ondrej Mosnáček <omosnacek@gmail.com>
            Date   : 2026-11-09T19:05:20+01:00
            Stats  : +4/-4 in 2 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/f337997540d0753dff354af30336918cd3b14e93?branch=main

            Log:
            kernel/CVE-2026-99064: avoid binary file

I realized it's actually simpler to have the testing packet
base64-encoded directly in the test script, rather than having it in a
binary file next to it. The content would be obfuscated one way or the
other, this way it's at least a bit simpler.

Signed-off-by: Ondrej Mosnáček <omosnacek@gmail.com>

---
diff --git a/kernel/CVE-2026-99064/runtest.sh b/kernel/CVE-2026-99064/runtest.sh
index cddd2ca..7f8c55a 100755
--- a/kernel/CVE-2026-99064/runtest.sh
+++ b/kernel/CVE-2026-99064/runtest.sh
@@ -55,6 +55,9 @@ rlJournalStart
         rlRun "while ! ip netns exec destination ncat --send-only -uzw 10 10.0.2.2 9999; do sleep 0.05; done" \
             0 "Wait for the server to start receiving"
 
+        # To re-generate this variable, run:
+        # ./generate_test_packet.py | base64 -w0
+        test_packet_data="TwAATAABAABAERNUCgABAgoAAgKGDQAAABABBwAA////BwsEAAAAAAAAAACeDQcLEAAAAAAAAAAAAAAAMDknDwAQ4itzdWNjZXNzCg=="
         # Inject a crafted packet into the 'ingress' namespace to trigger
         # the bug. Note that we can't send the packet normally through a
         # socket, because then netlabel would remove the CIPSO option too
@@ -64,10 +67,7 @@ rlJournalStart
         # corrupted when it's being routed through the 'ingress' namespace.
         # If it's fixed, the packet will go through successfully and will
         # be received by the server.
-        #
-        # To re-generate test_packet.data, run:
-        # ./generate_test_packet.py >test_packet.data
-        rlRun "ip netns exec ingress socat -u STDIN TUN:10.0.1.1/24,iff-up,tun-name=tun-in,iff-no-pi <test_packet.data" \
+        rlRun "echo '$test_packet_data' | base64 -d | ip netns exec ingress socat -u STDIN TUN:10.0.1.1/24,iff-up,tun-name=tun-in,iff-no-pi" \
             0 "Send a crafted packet to trigger the bug"
 
         rlRun "sleep 2" 0 "Wait to make sure the packet had a chance to be delivered"

diff --git a/kernel/CVE-2026-99064/test_packet.data b/kernel/CVE-2026-99064/test_packet.data
deleted file mode 100644
index 4b551a6..0000000
Binary files a/kernel/CVE-2026-99064/test_packet.data and /dev/null differ

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-12  8:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-12  8:21 [tests/selinux] main: kernel/CVE-2026-99064: avoid binary file 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox