2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

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.

(cherry picked from commit 35ef25e5ea)
This commit is contained in:
Aram Sargsyan
2024-09-11 15:58:11 +00:00
committed by Arаm Sаrgsyаn
parent 02822b70ee
commit 65fced42b9

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);