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:
committed by
Arаm Sаrgsyаn
parent
02822b70ee
commit
65fced42b9
@@ -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);
|
||||
|
Reference in New Issue
Block a user