[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] seccomp: don't block getters for resource control syscalls
From: |
Eduardo Otubo |
Subject: |
Re: [PATCH] seccomp: don't block getters for resource control syscalls |
Date: |
Thu, 1 Jul 2021 09:15:01 +0200 |
User-agent: |
Mutt/1.8.3+47 (5f034395e53d) (2017-05-23) |
On 30/06/2021 - 17:05:26, Daniel P. Berrange wrote:
> 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
> 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
>
Acked-by: Eduardo Otubo <otubo@redhat.com>
signature.asc
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH] seccomp: don't block getters for resource control syscalls,
Eduardo Otubo <=