Skip to content

Commit

Permalink
Spoof the return value
Browse files Browse the repository at this point in the history
  • Loading branch information
vimpostor committed Jan 5, 2025
1 parent de7e7e2 commit 3aaf09b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/bin/seccomp/seccomp_exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ int handle_req(struct seccomp_notif *req,
addfd.id = req->id;
addfd.flags = SECCOMP_ADDFD_FLAG_SEND; // add the fd and return it, atomically
addfd.srcfd = ret;
resp->val = ret;
// note that this branch does not need the SECCOMP_IOCTL_NOTIF_SEND, because this ADDFD call already includes it due to the SECCOMP_ADDFD_FLAG_SEND flag
ret = ioctl(listener, SECCOMP_IOCTL_NOTIF_ADDFD, &addfd);
if (ret == -1) {
Expand Down

0 comments on commit 3aaf09b

Please sign in to comment.