summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-07-03 00:34:19 +0100
committerSam James <sam@gentoo.org>2023-07-03 00:34:42 +0100
commit229d28a525799ae2f65b1a2cd206b07189241026 (patch)
tree9d95db2cc065a7fc9eb8c60c4b49870e88c0b2ad
parentsys-apps/inxi: drop 3.3.17.1 (diff)
downloadgentoo-229d28a525799ae2f65b1a2cd206b07189241026.tar.gz
gentoo-229d28a525799ae2f65b1a2cd206b07189241026.tar.bz2
gentoo-229d28a525799ae2f65b1a2cd206b07189241026.zip
app-emulation/qemu: use right CVE-2023-2861 patch for 8.0.2
Fixes: d2d08ad4d9a70136bf79818eb698e3cb7eead3b0 Bug: https://bugs.gentoo.org/909542 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--app-emulation/qemu/files/qemu-8.0.2-CVE-2023-2861.patch23
-rw-r--r--app-emulation/qemu/qemu-8.0.2-r2.ebuild (renamed from app-emulation/qemu/qemu-8.0.2-r1.ebuild)0
2 files changed, 14 insertions, 9 deletions
diff --git a/app-emulation/qemu/files/qemu-8.0.2-CVE-2023-2861.patch b/app-emulation/qemu/files/qemu-8.0.2-CVE-2023-2861.patch
index 9a9c11a41d66..75fa534b4f1c 100644
--- a/app-emulation/qemu/files/qemu-8.0.2-CVE-2023-2861.patch
+++ b/app-emulation/qemu/files/qemu-8.0.2-CVE-2023-2861.patch
@@ -1,7 +1,7 @@
https://bugs.gentoo.org/909542
-https://gitlab.com/qemu-project/qemu/-/commit/10fad73a2bf1c76c8aa9d6322755e5f877d83ce5
+https://gitlab.com/qemu-project/qemu/-/commit/b9d2887be4e616cdaeedd0b7456bfaa71ee798af
-From 10fad73a2bf1c76c8aa9d6322755e5f877d83ce5 Mon Sep 17 00:00:00 2001
+From b9d2887be4e616cdaeedd0b7456bfaa71ee798af Mon Sep 17 00:00:00 2001
From: Christian Schoenebeck <qemu_oss@crudebyte.com>
Date: Wed, 7 Jun 2023 18:29:33 +0200
Subject: [PATCH] 9pfs: prevent opening special files (CVE-2023-2861)
@@ -39,7 +39,6 @@ Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Message-Id: <E1q6w7r-0000Q0-NM@lizzy.crudebyte.com>
(cherry picked from commit f6b0de53fb87ddefed348a39284c8e2f28dc4eda)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-(Mjt: drop adding qemu_fstat wrapper for 7.2 where wrappers aren't used)
--- a/fsdev/virtfs-proxy-helper.c
+++ b/fsdev/virtfs-proxy-helper.c
@@ -26,6 +26,7 @@
@@ -108,7 +107,15 @@ Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
#ifdef O_PATH
#define O_PATH_9P_UTIL O_PATH
#else
-@@ -112,6 +114,38 @@ static inline void close_preserve_errno(int fd)
+@@ -95,6 +97,7 @@ static inline int errno_to_dotl(int err) {
+ #endif
+
+ #define qemu_openat openat
++#define qemu_fstat fstat
+ #define qemu_fstatat fstatat
+ #define qemu_mkdirat mkdirat
+ #define qemu_renameat renameat
+@@ -108,6 +111,38 @@ static inline void close_preserve_errno(int fd)
errno = serrno;
}
@@ -127,7 +134,7 @@ Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
+{
+ struct stat stbuf;
+
-+ if (fstat(fd, &stbuf) < 0) {
++ if (qemu_fstat(fd, &stbuf) < 0) {
+ close_preserve_errno(fd);
+ return -1;
+ }
@@ -146,8 +153,8 @@ Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
+
static inline int openat_dir(int dirfd, const char *name)
{
- return openat(dirfd, name,
-@@ -146,6 +180,10 @@ again:
+ return qemu_openat(dirfd, name,
+@@ -142,6 +177,10 @@ again:
return -1;
}
@@ -158,5 +165,3 @@ Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
serrno = errno;
/* O_NONBLOCK was only needed to open the file. Let's drop it. We don't
* do that with O_PATH since fcntl(F_SETFL) isn't supported, and openat()
---
-GitLab
diff --git a/app-emulation/qemu/qemu-8.0.2-r1.ebuild b/app-emulation/qemu/qemu-8.0.2-r2.ebuild
index 78edcdb58018..78edcdb58018 100644
--- a/app-emulation/qemu/qemu-8.0.2-r1.ebuild
+++ b/app-emulation/qemu/qemu-8.0.2-r2.ebuild