mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-14 00:25:20 +00:00
vmm, virtio-devices: allow mremap for consoles
SerialBuffer uses VecDeque::extend, which calls realloc, which a maximum buffer size of 1 MiB. Starting at allocation sizes of 128 KiB, musl's mallocng allocator will use mremap for the allocation. Since this was not permitted by the seccomp rules, heavy write load could crash cloud-hypervisor with a seccomp failure. (Encountered using virtio-console, but I don't see any reason it wouldn't happen for the legacy serial device too.) Signed-off-by: Alyssa Ross <hi@alyssa.is> (cherry picked from commit beed5e5d6d5635fe58b5d5960435ddcc3b89a1d0)
This commit is contained in:
parent
b475965632
commit
a633b009ed
@ -259,6 +259,7 @@ fn virtio_thread_common() -> Vec<(i64, Vec<SeccompRule>)> {
|
||||
(libc::SYS_madvise, vec![]),
|
||||
(libc::SYS_mmap, vec![]),
|
||||
(libc::SYS_mprotect, vec![]),
|
||||
(libc::SYS_mremap, vec![]),
|
||||
(libc::SYS_munmap, vec![]),
|
||||
(libc::SYS_openat, vec![]),
|
||||
(libc::SYS_read, vec![]),
|
||||
|
@ -708,6 +708,7 @@ fn vcpu_thread_rules(
|
||||
(libc::SYS_madvise, vec![]),
|
||||
(libc::SYS_mmap, vec![]),
|
||||
(libc::SYS_mprotect, vec![]),
|
||||
(libc::SYS_mremap, vec![]),
|
||||
(libc::SYS_munmap, vec![]),
|
||||
(libc::SYS_nanosleep, vec![]),
|
||||
(libc::SYS_newfstatat, vec![]),
|
||||
|
Loading…
x
Reference in New Issue
Block a user