From: Daniel P. Berrange Date: Mon, 13 May 2013 13:43:20 +0000 (+0100) Subject: Remove & ban use of select() for waiting for I/O X-Git-Tag: CVE-2013-1962~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8845d8dfa340f3065d7ee1e6e51cfb1ec9028ee6;p=thirdparty%2Flibvirt.git Remove & ban use of select() for waiting for I/O Use of the select() system call is inherantly dangerous since applications will hit a buffer overrun if any FD number exceeds the size of the select set size (typically 1024). Replace the two uses of select() with poll() and use cfg.mk to ban any future use of select(). NB: This changes the phyp driver so that it uses an infinite timeout, instead of busy-waiting for 1ms at a time. Signed-off-by: Daniel P. Berrange --- diff --git a/cfg.mk b/cfg.mk index 0bf5bfc1b6..bb93c6abb9 100644 --- a/cfg.mk +++ b/cfg.mk @@ -444,6 +444,11 @@ sc_prohibit_nonreentrant: done ; \ exit $$fail +sc_prohibit_select: + @prohibit="\\