Valentine Krasnobaeva 351ae5dbed BUG/MINOR: startup: fix UAF when set the default for log_tag
In the init_early() global.log_tag is initialized to the string from progname
pointer and global.log_tag.area points to this pointer.

If log-tag keyword is provided in the configuration, its parser at first frees
global.log_tag.area and then it does a new memory allocation to copy
there the argument of log-tag. So, progname no longer points to the valid
memory.

To fix this, let's always keep progname and global.log_tag.area at separate
memory areas. If log_tag will be redefined in the configuration, its parser will
free the memory allocated for the default value in chunk_destroy(). Memory
allocated for progname will be freed in deinit().

This should not be backported as related to the latest master-worker
refactoring.
2024-11-21 19:55:21 +01:00
..
2024-11-18 15:15:54 +01:00
2024-04-02 07:27:33 +02:00
2024-10-24 16:12:46 +02:00
2024-10-04 21:38:14 +02:00
2024-10-04 21:38:14 +02:00