Branch: refs/heads/misc-bugfixes
Home: https://github.com/kronosnet/kronosnet
Commit: 06dc5c42a344e163ca9a02420e01b94557508433
https://github.com/kronosnet/kronosnet/commit/06dc5c42a344e163ca9a02420e01b…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2026-05-27 (Wed, 27 May 2026)
Changed paths:
M libknet/handle_api.c
M libknet/libknet.h
M libknet/tests/api_knet_handle_add_datafd.c
Log Message:
-----------
libknet: add comprehensive file descriptor validation in knet_handle_add_datafd
Add validation to reject unsupported file descriptor types that would fail
at runtime. Reject user-provided AF_UNIX socketpairs (knet needs both ends
but API only accepts one), unidirectional pipes, and unconnected/unbound
sockets.
Add comprehensive test coverage with both blacklist (rejection) and
whitelist (acceptance) tests for various fd types.
Platform-specific handling:
- Linux: Detect and reject unidirectional pipes via fcntl(F_GETFL) check
- BSD/Solaris: Skip pipe direction check (pipes are bidirectional)
- Solaris: Handle getpeername() returning addrlen=0 for socketpairs
Signed-off-by: Fabio M. Di Nitto <fabbione(a)kronosnet.org>
Co-Authored-By: Claude Sonnet 4.5 <noreply(a)anthropic.com>
To unsubscribe from these emails, change your notification settings at https://github.com/kronosnet/kronosnet/settings/notifications
Branch: refs/heads/misc-bugfixes
Home: https://github.com/kronosnet/kronosnet
Commit: 8622db5decd11f8a7ddf0f2e80d64807de081dc3
https://github.com/kronosnet/kronosnet/commit/8622db5decd11f8a7ddf0f2e80d64…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2026-05-27 (Wed, 27 May 2026)
Changed paths:
M libknet/handle_api.c
M libknet/libknet.h
M libknet/tests/api_knet_handle_add_datafd.c
Log Message:
-----------
libknet: add comprehensive file descriptor validation in knet_handle_add_datafd
Add validation to reject unsupported file descriptor types that would fail
at runtime. Reject user-provided AF_UNIX socketpairs (knet needs both ends
but API only accepts one), unidirectional pipes, and unconnected/unbound
sockets.
Add comprehensive test coverage with both blacklist (rejection) and
whitelist (acceptance) tests for various fd types.
Platform-specific handling:
- Linux: Detect and reject unidirectional pipes via fcntl(F_GETFL) check
- BSD/Solaris: Skip pipe direction check (pipes are bidirectional)
- Solaris: Handle getpeername() returning addrlen=0 for socketpairs
Signed-off-by: Fabio M. Di Nitto <fabbione(a)kronosnet.org>
Co-Authored-By: Claude Sonnet 4.5 <noreply(a)anthropic.com>
To unsubscribe from these emails, change your notification settings at https://github.com/kronosnet/kronosnet/settings/notifications