summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-extended/libvirt/libvirt/CVE-2025-13193.patch40
-rw-r--r--recipes-extended/libvirt/libvirt_10.0.0.bb1
2 files changed, 41 insertions, 0 deletions
diff --git a/recipes-extended/libvirt/libvirt/CVE-2025-13193.patch b/recipes-extended/libvirt/libvirt/CVE-2025-13193.patch
new file mode 100644
index 00000000..1ce5de38
--- /dev/null
+++ b/recipes-extended/libvirt/libvirt/CVE-2025-13193.patch
@@ -0,0 +1,40 @@
1From a379327d8abcde8ac8d3e16fe5e4ba6f790d767a Mon Sep 17 00:00:00 2001
2From: Peter Krempa <pkrempa@redhat.com>
3Date: Wed, 12 Nov 2025 17:52:05 +0100
4Subject: [PATCH] qemu: snapshot: Set umask for 'qemu-img' when creating
5 external inactive snapshots
6
7External inactive snapshots are created by invoking 'qemu-img' which
8creates the file. Currently qemu-img creates image with mode 644 based
9on default umask as libvirt doesn't set any.
10
11Having a world-readable image is obviously wrong so set the umask to
12077 to have the file readable only by the owner.
13
14Resolves: https://bugs.debian.org/1120119
15
16CVE: CVE-2025-13193
17
18Upstream-Status: Backport [https://gitlab.com/libvirt/libvirt/-/commit/a379327d8abcde8ac8d3e16fe5e4ba6f790d767a]
19
20Signed-off-by: Praveen Kumar <praveen.kumar@windriver.com>
21---
22 src/qemu/qemu_snapshot.c | 3 +++
23 1 file changed, 3 insertions(+)
24
25diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c
26index 73ff533..9819448 100644
27--- a/src/qemu/qemu_snapshot.c
28+++ b/src/qemu/qemu_snapshot.c
29@@ -233,6 +233,9 @@ qemuSnapshotCreateQcow2Files(virQEMUDriver *driver,
30 NULL)))
31 return -1;
32
33+ /* ensure that new files are only readable by the user */
34+ virCommandSetUmask(cmd, 0077);
35+
36 /* adds cmd line arg: backing_fmt=format,backing_file=/path/to/backing/file */
37 virBufferAsprintf(&buf, "backing_fmt=%s,backing_file=",
38 virStorageFileFormatTypeToString(defdisk->src->format));
39--
402.40.0
diff --git a/recipes-extended/libvirt/libvirt_10.0.0.bb b/recipes-extended/libvirt/libvirt_10.0.0.bb
index 22193ff3..c6e6069c 100644
--- a/recipes-extended/libvirt/libvirt_10.0.0.bb
+++ b/recipes-extended/libvirt/libvirt_10.0.0.bb
@@ -37,6 +37,7 @@ SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.xz;name=libvirt \
37 file://CVE-2024-1441.patch \ 37 file://CVE-2024-1441.patch \
38 file://CVE-2024-2494.patch \ 38 file://CVE-2024-2494.patch \
39 file://CVE-2024-4418.patch \ 39 file://CVE-2024-4418.patch \
40 file://CVE-2025-13193.patch \
40 " 41 "
41 42
42SRC_URI[libvirt.sha256sum] = "8ba2e72ec8bdd2418554a1474c42c35704c30174b7611eaf9a16544b71bcf00a" 43SRC_URI[libvirt.sha256sum] = "8ba2e72ec8bdd2418554a1474c42c35704c30174b7611eaf9a16544b71bcf00a"