]> git.ipfire.org Git - thirdparty/bind9.git/commit
Fix a race condition in xfrin_recv_done() when calling xfrin_reset()
authorAram Sargsyan <aram@isc.org>
Wed, 4 Mar 2026 16:25:33 +0000 (16:25 +0000)
committerAram Sargsyan <aram@isc.org>
Fri, 3 Apr 2026 11:01:34 +0000 (11:01 +0000)
commit141ff7bfa7bf97b5d2b55a8417c847ac81ca5bc1
treeff832fe1905cd9413ac63b843c08326c7a88702d
parent5c248e7d1acb97468d304d0e44f0074c5fbfc750
Fix a race condition in xfrin_recv_done() when calling xfrin_reset()

When the xfrin_recv_done() function decides to retry the transfer
using AXFR because of a previous error, it calls the xfrin_reset()
function which calls dns_db_closeversion() on 'xfr->ver'. The problem
is that the ixfr processing of a previous message could be still
in process in a worker thread, which then can use freed 'xfr->ver'.

If there is an ongoing worker thread delay the AXFR retry until after
the worker thread has finished its work.
lib/dns/xfrin.c