opnsense-src/lib/libcasper/tests
Mariusz Zaborski 08115d3004 libcasper: switch from select(2) to poll(2)
The previous implementation used FD_SET() on a stack-allocated fd_set,
which is an out-of-bounds write whenever the socket fd is >= FD_SETSIZE
(1024).

poll(2) takes an array indexed by slot rather than by fd value, so it
has no FD_SETSIZE limit.

Approved by:	re
Approved by:	so
Security:	FreeBSD-SA-26:22.libcasper
Security:	CVE-2026-39461
Reported by:    Joshua Rogers
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D56695
2026-05-20 13:52:00 +00:00
..
cap_main_test.c libcasper: switch from select(2) to poll(2) 2026-05-20 13:52:00 +00:00
Makefile libcasper: switch from select(2) to poll(2) 2026-05-20 13:52:00 +00:00