public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [tests/selinux] main: Add a test for CVE-2025-22063 & -38147
Date: Thu, 01 Oct 2026 07:29:56 GMT [thread overview]
Message-ID: <179083979699.1.3517267898898497654.tests-selinux-479b983daa5b@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : tests/selinux
Branch : main
Commit : 479b983daa5bb0bfb7239feaeb4af3a1e0cfb66e
Author : Ondrej Mosnáček <omosnacek@gmail.com>
Date : 2026-10-01T07:29:35+00:00
Stats : +107/-0 in 4 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/479b983daa5bb0bfb7239feaeb4af3a1e0cfb66e?branch=main
Log:
Add a test for CVE-2025-22063 & -38147
Signed-off-by: Ondrej Mosnáček <omosnacek@gmail.com>
---
diff --git a/kernel/CVE-2025-22063-38147/.gitignore b/kernel/CVE-2025-22063-38147/.gitignore
new file mode 100644
index 0000000..6263bf3
--- /dev/null
+++ b/kernel/CVE-2025-22063-38147/.gitignore
@@ -0,0 +1 @@
+reproducer
diff --git a/kernel/CVE-2025-22063-38147/main.fmf b/kernel/CVE-2025-22063-38147/main.fmf
new file mode 100644
index 0000000..e744d57
--- /dev/null
+++ b/kernel/CVE-2025-22063-38147/main.fmf
@@ -0,0 +1,44 @@
+summary: Test for CVE-2025-22063 and -38147
+description: |
+ Runs the reproducer for CVE-2025-22063 / CVE-2025-38147 (both are the
+ same issue).
+contact: Ondrej Mosnacek <omosnacek@gmail.com>
+component:
+ - kernel
+framework: beakerlib
+require:
+ - netlabel_tools
+ - gcc
+duration: 5m
+tier: 2
+check:
+ # The reproducer triggers a kernel BUG when the bug is present, so turn
+ # on the dmesg check.
+ - dmesg
+enabled: true
+link:
+ - relates: https://lore.kernel.org/linux-cve-announce/2025041607-CVE-2025-22063-dec0@gregkh/
+ - relates: https://lore.kernel.org/linux-cve-announce/2025070335-CVE-2025-38147-52a6@gregkh/
+ - relates: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=078aabd567de3d63d37d7673f714e309d369e6e2
+ - relates: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6e9f2df1c550ead7cecb3e450af1105735020c92
+ - verifies: https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2025-22063
+ - verifies: https://redhat.atlassian.net/browse/RHEL-257657
+ - verifies: https://redhat.atlassian.net/browse/RHEL-257658
+ - verifies: https://redhat.atlassian.net/browse/RHEL-257659
+ - verifies: https://redhat.atlassian.net/browse/RHEL-257660
+ - verifies: https://redhat.atlassian.net/browse/RHEL-257663
+ - verifies: https://redhat.atlassian.net/browse/RHEL-257665
+ - verifies: https://redhat.atlassian.net/browse/RHEL-257666
+ - verifies: https://redhat.atlassian.net/browse/RHEL-257668
+ - verifies: https://redhat.atlassian.net/browse/RHEL-257669
+ - verifies: https://redhat.atlassian.net/browse/RHEL-257670
+ - verifies: https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2025-38147
+ - verifies: https://redhat.atlassian.net/browse/RHEL-257673
+ - verifies: https://redhat.atlassian.net/browse/RHEL-257674
+ - verifies: https://redhat.atlassian.net/browse/RHEL-257675
+ - verifies: https://redhat.atlassian.net/browse/RHEL-257678
+ - verifies: https://redhat.atlassian.net/browse/RHEL-257679
+ - verifies: https://redhat.atlassian.net/browse/RHEL-257681
+ - verifies: https://redhat.atlassian.net/browse/RHEL-257683
+ - verifies: https://redhat.atlassian.net/browse/RHEL-257685
+ - verifies: https://redhat.atlassian.net/browse/RHEL-257686
diff --git a/kernel/CVE-2025-22063-38147/reproducer.c b/kernel/CVE-2025-22063-38147/reproducer.c
new file mode 100644
index 0000000..ac9c8b7
--- /dev/null
+++ b/kernel/CVE-2025-22063-38147/reproducer.c
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (c) 2026 Red Hat, Inc.
+ * Author: Ondrej Mosnacek <omosnacek@gmail.com>
+ */
+
+#include <stdlib.h>
+
+#include <arpa/inet.h>
+#include <sys/socket.h>
+
+int main(int argc, char **argv)
+{
+ struct sockaddr_in6 addr = {
+ .sin6_family = AF_INET6,
+ .sin6_port = htons(31337),
+ .sin6_addr = in6addr_loopback,
+ };
+ int fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
+
+ connect(fd, (struct sockaddr *)&addr, sizeof(addr));
+ return 0;
+}
diff --git a/kernel/CVE-2025-22063-38147/runtest.sh b/kernel/CVE-2025-22063-38147/runtest.sh
new file mode 100755
index 0000000..e855495
--- /dev/null
+++ b/kernel/CVE-2025-22063-38147/runtest.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2026 Red Hat, Inc.
+# Author: Ondrej Mosnacek <omosnacek@gmail.com>
+
+# Include Beakerlib environment
+. /usr/share/beakerlib/beakerlib.sh || exit 1
+
+rlJournalStart
+ rlPhaseStartSetup
+ rlRun "uname -r" 0 "Print kernel version"
+
+ rlRun "gcc -o reproducer reproducer.c" 0 "Compile the reproducer"
+
+ rlRun "netlabelctl calipso add pass doi:7" 0 "Set up CALIPSO"
+ rlRun "netlabelctl map del default" 0 "Delete default netlabel map"
+ rlRun "netlabelctl map add default address:0.0.0.0/0 protocol:unlbl" 0 \
+ "Set unlabeled traffic by default"
+ rlRun "netlabelctl map add default address:::/0 protocol:unlbl" 0 \
+ "Set unlabeled traffic by default"
+ rlRun "netlabelctl map add default address:0::1/128 protocol:calipso,7" 0 \
+ "Set up CALIPSO for localhost only"
+ rlPhaseEnd
+
+ rlPhaseStartTest
+ # Will trigger a kernel OOPS in dmesg or panic when vulnerable
+ rlRun "./reproducer" 0 "Run the reproducer"
+ rlPhaseEnd
+
+ rlPhaseStartCleanup
+ rlRun "netlabelctl map del default" 0 "Delete the CALIPSO map"
+ rlRun "netlabelctl calipso del doi:7" 0 "Unsetup CALIPSO"
+ rlRun "netlabelctl map add default protocol:unlbl" 0 "Re-add default netlabel map"
+
+ rlRun "rm -f reproducer" 0 "Delete the reproducer binary"
+ rlPhaseEnd
+rlJournalPrintText
+rlJournalEnd
reply other threads:[~2026-10-01 7:29 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=179083979699.1.3517267898898497654.tests-selinux-479b983daa5b@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