Merge pull request #3092 from Blub/seccomp-mem-rdwr

seccomp: open memfd read-write
This commit is contained in:
Christian Brauner 2019-07-16 15:17:11 +02:00 committed by GitHub
commit 57c73b9f90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1400,7 +1400,7 @@ int seccomp_notify_handler(int fd, uint32_t events, void *data,
} }
snprintf(mem_path, sizeof(mem_path), "/proc/%d/mem", req->pid); snprintf(mem_path, sizeof(mem_path), "/proc/%d/mem", req->pid);
fd_mem = open(mem_path, O_RDONLY | O_CLOEXEC); fd_mem = open(mem_path, O_RDWR | O_CLOEXEC);
if (fd_mem < 0) { if (fd_mem < 0) {
seccomp_notify_default_answer(fd, req, resp, hdlr); seccomp_notify_default_answer(fd, req, resp, hdlr);
SYSERROR("Failed to open process memory for seccomp notify request"); SYSERROR("Failed to open process memory for seccomp notify request");