bind9/lib/isc/netmgr
Ondřej Surý 72255dfc36 Guard against a detached stream in isc__nm_http_request() error path
On a submit failure, client_send() nullifies sock->h2->connect.cstream
and frees the stream before returning the error. The error: label in
isc__nm_http_request() reloaded that pointer and dereferenced it
unconditionally, reading through a NULL stream. The function is only
used by the DoH unit tests -- production DoH client send goes through
isc__nm_http_send()/client_httpsend(), whose submit failure is reported
via the NULL-safe send callback -- so this is a latent defect in the
test helper rather than a reachable named crash.

Skip the read callback when the stream has already been detached and
let the caller report the failure from the error result it receives.

Assisted-by: Claude:claude-opus-4-8
(cherry picked from commit 7df91b7634)
2026-06-16 15:20:56 +02:00
..
http.c Guard against a detached stream in isc__nm_http_request() error path 2026-06-16 15:20:56 +02:00
netmgr-int.h Implement IP_LOCAL_PORT_RANGE socket option for Linux 2026-02-20 17:02:45 +01:00
netmgr.c Rename isc_net_getudpportrange() to isc_net_getportrange() 2026-02-20 17:02:45 +01:00
proxystream.c Do not stop timer in isc_nm_read_stop() in manual timer mode 2025-01-15 16:05:56 +01:00
proxyudp.c Use clang-format-20 to update formatting 2025-06-25 13:32:08 +10:00
socket.c Implement IP_LOCAL_PORT_RANGE socket option for Linux 2026-02-20 17:02:45 +01:00
streamdns.c attach socket before async streamdns_resume_processing 2025-11-20 17:55:00 +00:00
tcp.c Fix spelling typos in comments and code 2026-06-01 15:04:31 +00:00
timer.c Update netmgr, tasks, and applications to use isc_loopmgr 2022-08-26 09:09:24 +02:00
tlsstream.c Fix missing server socket detach in TLS accept error path 2026-03-16 11:05:03 +01:00
udp.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00