Fix data race in offloaded dns_message_checksig()

When verifying a message in an offloaded thread there is a race with
the worker thread which writes to the same buffer. Clone the message
buffer before offloading.
This commit is contained in:
Aram Sargsyan 2024-09-11 15:58:11 +00:00 committed by Arаm Sаrgsyаn
parent 149b3d552e
commit 35ef25e5ea

View file

@ -3254,6 +3254,7 @@ dns_message_checksig_async(dns_message_t *msg, dns_view_t *view,
dns_message_attach(msg, &chsigctx->msg);
dns_view_attach(view, &chsigctx->view);
dns_message_clonebuffer(msg);
isc_work_enqueue(loop, checksig_run, checksig_cb, chsigctx);
return (DNS_R_WAIT);