Change #259810
| Category | None |
| Changed by | Daniel Stenberg <daniel@haxx.se> |
| Changed at | Tue 03 Mar 2026 23:46:12 |
| Repository | https://api.github.com/repos/curl/curl |
| Project | curl/curl |
| Branch | bagder/cloexec |
| Revision | 8572d69a096f84489fc68a41bc00f61a1240688f |
Comments
cf-socket: SOCK_CLOEXEC w/o breaking later socktype equality checks socket_open unconditionally ORs SOCK_CLOEXEC into addr->socktype. The same addr structure is later reused in cf_socket_open, which checks ctx->addr.socktype == SOCK_STREAM to decide whether to enable TCP_NODELAY and TCP keepalive. With SOCK_CLOEXEC set, the equality check fails, so TCP-specific options are skipped and ctx->sock_connected is also computed against SOCK_DGRAM with a mismatching value. Follow-up to 05367694ecf24a5d39f Found by Codex Security
Changed files
- lib/cf-socket.c