]> git.ipfire.org Git - thirdparty/bind9.git/commit
fix: dev: Fix isc_buffer_init capacity mismatch in DoH data chunk callback
authorOndřej Surý <ondrej@isc.org>
Wed, 18 Mar 2026 10:39:16 +0000 (11:39 +0100)
committerOndřej Surý <ondrej@isc.org>
Wed, 18 Mar 2026 10:39:16 +0000 (11:39 +0100)
commit42f458d33f09fbe6f1277aa05752bfa143d87ca4
treebe638061fca465404a10839dfa9f94f215cf27af
parent929eccdfdc8ae3cab8be585b8d03fcaa15aae30b
parent8e240bbb5ff563b1caaa13afdd1338079e2d751b
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.

Merge branch 'ondrej/fix-isc_buffer_init-capacity-mismatch-in-DoH' into 'main'

See merge request isc-projects/bind9!11662