fix(libkernel): fail a short or long socket address like FreeBSD #8154
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8154"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-20T00:48:08Z.
What
Address()(Udp.cpp, used by bind, connect and sendto) now checks the length first like FreeBSD 11.4getsockaddr: above 255 bytesENAMETOOLONG, below 2EINVAL, then a null pointerEFAULT; an AF_INET address below 16 or an AF_INET6 address below 28 bytes fails withEINVALinstead ofEAFNOSUPPORT. Debt entry added for what stays different (an address longer thansockaddr_in/sockaddr_in6is still accepted; other families stillEAFNOSUPPORT).Fixes #8153
Tested
Windows 10 (19045), MinGW-w64 GCC 15.2.0, Release, on
upstream/main34b1b77abf+ this branch:guest_socket_address_length:Exit code 0xc0000409without the change to Udp.cpp, passes with it.guest_socket_options,_stream_options,_timeouts,_read_write,_port_zero,_pair,_descriptors,_events,_connect_listening,_descriptor_flags,_error,guest_udp) pass.python tools/check_conventions.py --base upstream/main: passes.Checklist
main; no open PR touches socket address validation (searched: only closed #4920, the earlier version).mdfiles or images added to the repositoryAI-assisted (Claude Code).
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-20T00:58:13Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/prx/libkernel/CMakeLists.txtcore/libs/prx/libkernel/CMakeLists.txtcore/libs/prx/libkernel/Socket/src/Udp.cppdocs/dev/debt/libkernel.mdcore/libs/prx/libkernel/CMakeLists.txtdocs/dev/debt/libkernel.mdcore/libs/prx/libkernel/CMakeLists.txtcore/libs/prx/libkernel/CMakeLists.txtdocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mdcore/libs/prx/libkernel/CMakeLists.txtcore/libs/prx/libkernel/Socket/src/Udp.cppdocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mdcore/libs/prx/libkernel/Socket/src/Udp.cppdocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mdcore/libs/prx/libkernel/CMakeLists.txtdocs/dev/debt/libkernel.mdcore/libs/prx/libkernel/CMakeLists.txtcore/libs/prx/libkernel/Socket/src/Udp.cppdocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mdcore/libs/prx/libkernel/Socket/src/Udp.cppdocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.md