public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [tests/selinux] main: kernel/CVE-2026-99064: avoid binary file
Date: Thu, 12 Nov 2026 08:21:13 GMT	[thread overview]
Message-ID: <179447167370.1.6265023339711476543.tests-selinux-f337997540d0@fedoraproject.org> (raw)

            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

                 reply	other threads:[~2026-11-12  8:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179447167370.1.6265023339711476543.tests-selinux-f337997540d0@fedoraproject.org \
    --to=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox