aboutsummaryrefslogtreecommitdiff
path: root/lib/libcasper/tests/Makefile
diff options
context:
space:
mode:
authorMariusz Zaborski <oshogbo@FreeBSD.org>2026-05-18 15:32:49 +0000
committerMark Johnston <markj@FreeBSD.org>2026-05-20 19:36:01 +0000
commit23929d729d1a1bcc0249c2519635de55b57acbc0 (patch)
treef6baa8f3fd3ce69d1a643e39805ebfdbbf2173bb /lib/libcasper/tests/Makefile
parent3b4afab9add29d2950152668e70194e1c76b0f69 (diff)
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: 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
Diffstat (limited to 'lib/libcasper/tests/Makefile')
-rw-r--r--lib/libcasper/tests/Makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/libcasper/tests/Makefile b/lib/libcasper/tests/Makefile
index 4b6c72fd86e8..1ddb7e72128b 100644
--- a/lib/libcasper/tests/Makefile
+++ b/lib/libcasper/tests/Makefile
@@ -1,6 +1,13 @@
-.PATH: ${SRCTOP}/tests
+.include <src.opts.mk>
PACKAGE= tests
-KYUAFILE= yes
+
+ATF_TESTS_C= cap_main_test
+
+.if ${MK_CASPER} != "no"
+LIBADD+= casper
+CFLAGS+= -DWITH_CASPER
+.endif
+LIBADD+= nv
.include <bsd.test.mk>