Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkg/sentry/syscalls/linux/sys_aio.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ func IoSetup(t *kernel.Task, sysno uintptr, args arch.SyscallArguments) (uintptr
nrEvents := args[0].Int()
idAddr := args[1].Pointer()

if nrEvents <= 0 || nrEvents > 65536 {
return 0, nil, linuxerr.EINVAL
}

// Linux uses the native long as the aio ID.
//
// The context pointer _must_ be zero initially.
Expand Down