mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
systrap: set all arguments of prctl(PR_SET_NO_NEW_PRIVS)
The kernel returns EINVAL if any of unused arguments are non-zero. Reported-by: syzbot+4de40c5bc3421bffcf6c@syzkaller.appspotmail.com PiperOrigin-RevId: 520072701
This commit is contained in:
@@ -1086,6 +1086,9 @@ func (s *subprocess) createSysmsgThread(tregs *arch.Registers, c *context, ac *a
|
||||
_, err = p.syscallIgnoreInterrupt(&p.initRegs, unix.SYS_PRCTL,
|
||||
arch.SyscallArgument{Value: uintptr(linux.PR_SET_NO_NEW_PRIVS)},
|
||||
arch.SyscallArgument{Value: uintptr(1)},
|
||||
arch.SyscallArgument{Value: uintptr(0)},
|
||||
arch.SyscallArgument{Value: uintptr(0)},
|
||||
arch.SyscallArgument{Value: uintptr(0)},
|
||||
arch.SyscallArgument{Value: uintptr(0)})
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("prctl(PR_SET_NO_NEW_PRIVS) failed: %v", err))
|
||||
|
||||
Reference in New Issue
Block a user