]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: Fix memory corruption when using `getAddressInfo` 15519/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 30 Apr 2025 14:51:04 +0000 (16:51 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 5 May 2025 10:58:54 +0000 (12:58 +0200)
commit826b44b7e6b0ff84bf7625dfb6caf8681eca06ae
treed2ab07b6e032354df6f13b42a254aee33fbc69ca
parent44a2a15db4a2eef3aab771ee26fa0fc5813b12e7
dnsdist: Fix memory corruption when using `getAddressInfo`

The object holding the callback function, which is translated into
a `LuaContext::LuaFunctionCaller`, needs to be destroyed while holding
the Lua mutex because it will unregister itself from the Lua context,
causing a corruption if a different thread is accessing the Lua context
at the same time.

(cherry picked from commit fdfda2cc394e49c83b36536e14c91f165fef5a5d)
pdns/dnsdist-lua-bindings.cc