pathtrace: limit amount of checked poll fds similarly to select limit

* pathtrace.c (pathtrace_match_set): Limit the maximum descriptor number
checked for fd match in poll family syscalls to 1024 * 1024.
This commit is contained in:
Eugene Syromyatnikov 2017-07-21 20:15:24 +02:00 committed by Dmitry V. Levin
parent b94e67bddc
commit 456c95cdc2

View File

@ -323,6 +323,8 @@ pathtrace_match_set(struct tcb *tcp, struct path_set *set)
start = tcp->u_arg[0];
nfds = tcp->u_arg[1];
if (nfds > 1024 * 1024)
nfds = 1024 * 1024;
end = start + sizeof(fds) * nfds;
if (nfds == 0 || end < start)