]> git.ipfire.org Git - thirdparty/bind9.git/commit
[9.20] fix: dev: Fix isc_buffer_init capacity mismatch in DoH data chunk callback
authorOndřej Surý <ondrej@isc.org>
Wed, 18 Mar 2026 14:26:29 +0000 (15:26 +0100)
committerOndřej Surý <ondrej@isc.org>
Wed, 18 Mar 2026 14:26:29 +0000 (15:26 +0100)
commitf0a2b07359ca3685e56d80c233f96795b8e678fd
tree1eabf9c7d8de7c398a34e4e6bab17f3e48c464b4
parent6a32c1acdc78dba3911bb32193eb3a1015c859c4
parentd685d448e2ca5b7b5187b37507bfaf46777e2984
[9.20] fix: dev: 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.

Backport of MR !11662

Merge branch 'backport-ondrej/fix-isc_buffer_init-capacity-mismatch-in-DoH-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11709