]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: Fix memory corruption when using `getAddressInfo` 15514/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 30 Apr 2025 14:51:04 +0000 (16:51 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 30 Apr 2025 14:51:04 +0000 (16:51 +0200)
commitfdfda2cc394e49c83b36536e14c91f165fef5a5d
tree33304552421565dff46b146e1c0822f946855aee
parentadd687957994b530fdf8acc1d67eb0659e6dfbfc
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.
pdns/dnsdistdist/dnsdist-lua-bindings.cc