[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 21/26] seccomp: don't block getters for resource control syscalls
From: |
Daniel P . Berrangé |
Subject: |
[PULL 21/26] seccomp: don't block getters for resource control syscalls |
Date: |
Wed, 14 Jul 2021 15:08:53 +0100 |
Recent GLibC calls sched_getaffinity in code paths related to malloc and
when QEMU blocks access, it sends it off into a bad codepath resulting
in stack exhaustion[1]. The GLibC bug is being fixed[2], but none the
less, GLibC has valid reasons to want to use sched_getaffinity.
It is not unreasonable for code to want to run many resource syscalls
for information gathering, so it is a bit too harsh for QEMU to block
them.
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1975693
[2] https://sourceware.org/pipermail/libc-alpha/2021-June/128271.html
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Acked-by: Eduardo Otubo <otubo@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
softmmu/qemu-seccomp.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/softmmu/qemu-seccomp.c b/softmmu/qemu-seccomp.c
index 9c29d9cf00..f50026778c 100644
--- a/softmmu/qemu-seccomp.c
+++ b/softmmu/qemu-seccomp.c
@@ -97,17 +97,11 @@ static const struct QemuSeccompSyscall denylist[] = {
{ SCMP_SYS(vfork), QEMU_SECCOMP_SET_SPAWN },
{ SCMP_SYS(execve), QEMU_SECCOMP_SET_SPAWN },
/* resource control */
- { SCMP_SYS(getpriority), QEMU_SECCOMP_SET_RESOURCECTL },
{ SCMP_SYS(setpriority), QEMU_SECCOMP_SET_RESOURCECTL },
{ SCMP_SYS(sched_setparam), QEMU_SECCOMP_SET_RESOURCECTL },
- { SCMP_SYS(sched_getparam), QEMU_SECCOMP_SET_RESOURCECTL },
{ SCMP_SYS(sched_setscheduler), QEMU_SECCOMP_SET_RESOURCECTL,
ARRAY_SIZE(sched_setscheduler_arg), sched_setscheduler_arg },
- { SCMP_SYS(sched_getscheduler), QEMU_SECCOMP_SET_RESOURCECTL },
{ SCMP_SYS(sched_setaffinity), QEMU_SECCOMP_SET_RESOURCECTL },
- { SCMP_SYS(sched_getaffinity), QEMU_SECCOMP_SET_RESOURCECTL },
- { SCMP_SYS(sched_get_priority_max), QEMU_SECCOMP_SET_RESOURCECTL },
- { SCMP_SYS(sched_get_priority_min), QEMU_SECCOMP_SET_RESOURCECTL },
};
static inline __attribute__((unused)) int
--
2.31.1
- [PULL 11/26] crypto: replace 'des-rfb' cipher with 'des', (continued)
- [PULL 11/26] crypto: replace 'des-rfb' cipher with 'des', Daniel P . Berrangé, 2021/07/14
- [PULL 13/26] crypto: introduce build system for gnutls crypto backend, Daniel P . Berrangé, 2021/07/14
- [PULL 12/26] crypto: flip priority of backends to prefer gcrypt, Daniel P . Berrangé, 2021/07/14
- [PULL 14/26] crypto: add gnutls cipher provider, Daniel P . Berrangé, 2021/07/14
- [PULL 15/26] crypto: add gnutls hash provider, Daniel P . Berrangé, 2021/07/14
- [PULL 16/26] crypto: add gnutls hmac provider, Daniel P . Berrangé, 2021/07/14
- [PULL 17/26] crypto: add gnutls pbkdf provider, Daniel P . Berrangé, 2021/07/14
- [PULL 18/26] crypto: prefer gnutls as the crypto backend if new enough, Daniel P . Berrangé, 2021/07/14
- [PULL 19/26] net/rocker: use GDateTime for formatting timestamp in debug messages, Daniel P . Berrangé, 2021/07/14
- [PULL 20/26] io: use GDateTime for formatting timestamp for websock headers, Daniel P . Berrangé, 2021/07/14
- [PULL 21/26] seccomp: don't block getters for resource control syscalls,
Daniel P . Berrangé <=
- [PULL 22/26] tests/migration: fix unix socket migration, Daniel P . Berrangé, 2021/07/14
- [PULL 23/26] docs: fix typo s/Intel/AMD/ in CPU model notes, Daniel P . Berrangé, 2021/07/14
- [PULL 24/26] qemu-options: re-arrange CPU topology options, Daniel P . Berrangé, 2021/07/14
- [PULL 25/26] qemu-options: tweak to show that CPU count is optional, Daniel P . Berrangé, 2021/07/14
- [PULL 26/26] qemu-options: rewrite help for -smp options, Daniel P . Berrangé, 2021/07/14
- Re: [PULL v2 00/26] Crypto and more patches, Peter Maydell, 2021/07/15