]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[9.20] fix: dev: Fix use-after-free in xfrin_recv_done
authorOndřej Surý <ondrej@isc.org>
Mon, 16 Mar 2026 11:00:13 +0000 (12:00 +0100)
committerOndřej Surý <ondrej@isc.org>
Mon, 16 Mar 2026 11:00:13 +0000 (12:00 +0100)
Move the LIBDNS_XFRIN_RECV_DONE probe execution before dns_xfrin_detach
in xfrin_recv_done.

Previously, dns_xfrin_detach was called before the trace probe, which
could free the xfr object.  Because the accessed member xfr->info is an
embedded array, the expression evaluates via pointer arithmetic rather
than a direct memory dereference.  Although this prevents a reliable
crash in practice, it technically remains a use-after-free issue.
Reorder the statements to ensure the transfer context is fully valid
when the probe executes.

Closes #5786

Backport of MR !11632

Merge branch 'backport-5786-fix-dtrace-after-free-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11694


Trivial merge