diff --git a/0001-CVE-2023-6683.patch b/0001-CVE-2023-6683.patch new file mode 100644 index 0000000000000000000000000000000000000000..8f8acdb7e3ce722c28035ea3138a8e2bba8ab151 --- /dev/null +++ b/0001-CVE-2023-6683.patch @@ -0,0 +1,36 @@ +From 75fa25f9c55b441e2803785848292ad3bc0482d5 Mon Sep 17 00:00:00 2001 +From: songmingliang +Date: Tue, 18 Jun 2024 16:25:30 +0800 +Subject: [PATCH] CVE-2023-6683 + +--- + ui/clipboard.c | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +diff --git a/ui/clipboard.c b/ui/clipboard.c +index 3d14bffaf..e1a7fca8e 100644 +--- a/ui/clipboard.c ++++ b/ui/clipboard.c +@@ -163,9 +163,16 @@ void qemu_clipboard_set_data(QemuClipboardPeer *peer, + } + + g_free(info->types[type].data); +- info->types[type].data = g_memdup(data, size); +- info->types[type].size = size; +- info->types[type].available = true; ++ if (size) { ++ info->types[type].data = g_memdup2(data, size); ++ info->types[type].size = size; ++ info->types[type].available = true; ++ } else { ++ info->types[type].data = NULL; ++ info->types[type].size = 0; ++ info->types[type].available = false; ++ } ++ + + if (update) { + qemu_clipboard_update(info); +-- +2.27.0 + diff --git a/qemu.spec b/qemu.spec index fd9c2d05b334689f2db70c82dca788a531e62dea..c3dd9aab769b5e151cf3785a1d7d30fecde23ed6 100644 --- a/qemu.spec +++ b/qemu.spec @@ -1,4 +1,4 @@ -%define anolis_release 1 +%define anolis_release 2 %bcond_with check @@ -264,6 +264,7 @@ Source31: kvm-x86.conf Source36: README.tests Patch0001: 0001-sgx-stub-fix.patch +Patch0002: 0001-CVE-2023-6683.patch BuildRequires: meson >= %{meson_version} BuildRequires: zlib-devel @@ -1786,6 +1787,9 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %endif %changelog +* Tue Jun 18 2024 pangqing - 2:7.2.4-2 +- CVE-2023-6683 + * Wed Jul 12 2023 Funda Wang - 2:7.2.4-1 - New version 7.2.4