From: Arаm Sаrgsyаn Date: Wed, 23 Apr 2025 13:42:10 +0000 (+0000) Subject: fix: dev: Fix a date race in qpcache_addrdataset() X-Git-Tag: v9.21.8~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47ccf613eb049b545749f025f1a170a8a20f60c4;p=thirdparty%2Fbind9.git fix: dev: Fix a date race in qpcache_addrdataset() The 'qpnode->nsec' structure member isn't protected by a lock and there's a data race between the reading and writing parts in the qpcache_addrdataset() function. Use a node read lock for accessing 'qpnode->nsec' in qpcache_addrdataset(). Add an additional 'qpnode->nsec != DNS_DB_NSEC_HAS_NSEC' check under a write lock to be sure that no other competing thread changed it in the time when the read lock is unlocked and a write lock is not acquired yet. Closes #5285 Merge branch '5285-data-race-in-qpcache_addrdataset' into 'main' See merge request isc-projects/bind9!10397 --- 47ccf613eb049b545749f025f1a170a8a20f60c4