Skip to content

Commit 67c0c70

Browse files
[AutoPR- Security] Patch libvirt for CVE-2025-13193 [MEDIUM] (#15149)
1 parent 434b42b commit 67c0c70

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

SPECS/libvirt/CVE-2025-13193.patch

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
From b3c22760e37dbbd8c3be2368c62dc34289faff42 Mon Sep 17 00:00:00 2001
2+
From: Peter Krempa <[email protected]>
3+
Date: Wed, 12 Nov 2025 17:52:05 +0100
4+
Subject: [PATCH] qemu: snapshot: Set umask for 'qemu-img' when creating
5+
external inactive snapshots
6+
7+
External inactive snapshots are created by invoking 'qemu-img' which
8+
creates the file. Currently qemu-img creates image with mode 644 based
9+
on default umask as libvirt doesn't set any.
10+
11+
Having a world-readable image is obviously wrong so set the umask to
12+
077 to have the file readable only by the owner.
13+
14+
Resolves: https://bugs.debian.org/1120119
15+
Signed-off-by: Peter Krempa <[email protected]>
16+
Signed-off-by: rpm-build <rpm-build>
17+
Upstream-reference: https://gitlab.com/libvirt/libvirt/-/commit/a379327d8abcde8ac8d3e16fe5e4ba6f790d767a.patch
18+
---
19+
src/qemu/qemu_snapshot.c | 3 +++
20+
1 file changed, 3 insertions(+)
21+
22+
diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c
23+
index 73ff533..9819448 100644
24+
--- a/src/qemu/qemu_snapshot.c
25+
+++ b/src/qemu/qemu_snapshot.c
26+
@@ -233,6 +233,9 @@ qemuSnapshotCreateQcow2Files(virQEMUDriver *driver,
27+
NULL)))
28+
return -1;
29+
30+
+ /* ensure that new files are only readable by the user */
31+
+ virCommandSetUmask(cmd, 0077);
32+
+
33+
/* adds cmd line arg: backing_fmt=format,backing_file=/path/to/backing/file */
34+
virBufferAsprintf(&buf, "backing_fmt=%s,backing_file=",
35+
virStorageFileFormatTypeToString(defdisk->src->format));
36+
--
37+
2.45.4
38+

SPECS/libvirt/libvirt.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
Summary: Library providing a simple virtualization API
186186
Name: libvirt
187187
Version: 10.0.0
188-
Release: 5%{?dist}
188+
Release: 6%{?dist}
189189
License: GPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OFL-1.1
190190
Vendor: Microsoft Corporation
191191
Distribution: Azure Linux
@@ -199,6 +199,7 @@ Patch0: libvirt-conf.patch
199199
Patch1: CVE-2024-1441.patch
200200
Patch2: CVE-2024-2494.patch
201201
Patch3: CVE-2024-4418.patch
202+
Patch4: CVE-2025-13193.patch
202203

203204
Requires: libvirt-daemon = %{version}-%{release}
204205
Requires: libvirt-daemon-config-network = %{version}-%{release}
@@ -2189,6 +2190,9 @@ exit 0
21892190
%endif
21902191

21912192
%changelog
2193+
* Fri Nov 21 2025 Azure Linux Security Servicing Account <[email protected]> - 10.0.0-6
2194+
- Patch for CVE-2025-13193
2195+
21922196
* Thu May 15 2025 Aninda Pradhan <[email protected]> - 10.0.0-5
21932197
- Fixes CVE-2024-4418 with an upstream patch
21942198

0 commit comments

Comments
 (0)