[Rspamd-Users] Segfault with using lua mempool bucket

Vsevolod Stakhov vsevolod at rspamd.com
Sun May 2 19:31:14 UTC 2021


Hello Steve,

On 30/04/2021 20:40, Steve Sturges (ststurge) via Users wrote:
> Hi—
> 
> I’ve run into an issue when trying to store the length of filenames attached to an email for later use by rules… Getting a segfault when storing those lengths in a lua table/mempool.  This was seen with rspamd 2.6, but the code in 2.7 is the same.
> 
> Below is the relevant parts of the stack trace and the change I made to address it in the attached patch.  In all of the other cases where I’ve seen combinations of lua_createtable, and then lua_pushnumber followed by lua_rawseti inside a loop, the index specified is -2 — both in rspamd and elsewhere, but this specific one used -1.
> 

Committed, thank you!
https://github.com/rspamd/rspamd/commit/c9167ec1e4c5d72770c2cefb00869fd8a0c14d49



More information about the Users mailing list