mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-10 02:47:36 +00:00
seccomp: recvmsg with MSG_TRUNC
We only read the message without the cookie. For now assert that the sender also didn't try to send more by letting `recvmsg()` return the original size of the packet if it was longer. Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
214008eeb2
commit
87e547d9c7
@ -1466,7 +1466,8 @@ retry:
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
bytes = lxc_recvmsg_nointr_iov(listener_proxy_fd, iov,iov_len, 0);
|
bytes = lxc_recvmsg_nointr_iov(listener_proxy_fd, iov,iov_len,
|
||||||
|
MSG_TRUNC);
|
||||||
if (bytes != (ssize_t)msg_base_size) {
|
if (bytes != (ssize_t)msg_base_size) {
|
||||||
SYSERROR("Failed to receive message from seccomp proxy");
|
SYSERROR("Failed to receive message from seccomp proxy");
|
||||||
seccomp_notify_default_answer(fd, req, resp, hdlr);
|
seccomp_notify_default_answer(fd, req, resp, hdlr);
|
||||||
|
Loading…
Reference in New Issue
Block a user