]> git.ipfire.org Git - thirdparty/bind9.git/commit
Fix isc_buffer_init capacity mismatch in DoH data chunk callback
authorOndřej Surý <ondrej@isc.org>
Wed, 11 Mar 2026 12:17:45 +0000 (13:17 +0100)
committerOndřej Surý (GitLab job 7052034) <ondrej@isc.org>
Wed, 18 Mar 2026 10:39:38 +0000 (10:39 +0000)
commitd685d448e2ca5b7b5187b37507bfaf46777e2984
tree1eabf9c7d8de7c398a34e4e6bab17f3e48c464b4
parent6a32c1acdc78dba3911bb32193eb3a1015c859c4
Fix isc_buffer_init capacity mismatch in DoH data chunk callback

isc_buffer_init() is given MAX_DNS_MESSAGE_SIZE (65535) as capacity but
only h2->content_length bytes are allocated.  This makes the buffer
believe it has more space than actually allocated.  A secondary bounds
check (new_bufsize <= h2->content_length) prevents actual overflow, but
the buffer invariant is violated.

Pass h2->content_length as the capacity to match the allocation.

(cherry picked from commit 8e240bbb5ff563b1caaa13afdd1338079e2d751b)
lib/isc/netmgr/http.c