]> git.ipfire.org Git - thirdparty/ulogd2.git/commit
ulogd: ignore private data on plugin stop
authorCorubba Smith <corubba@gmx.de>
Sat, 8 Mar 2025 21:37:28 +0000 (22:37 +0100)
committerFlorian Westphal <fw@strlen.de>
Tue, 11 Mar 2025 20:40:45 +0000 (21:40 +0100)
commit33e19497f4ad88bcf08e10ac51c3ed091f60c9dc
tree66ae5a9f608c66e602872112bd2bf1f8f698c369
parente318d352b1085ec55b998c501d67d758dfa74a1f
ulogd: ignore private data on plugin stop

When deciding whether to call the stop hook of a plugin instance, only
two things are relevant: If the plugin actually has a stop hook defined,
and if the plugin instance is still used in a different stack. The
private data of a plugin instance is opaque to ulogd, so its size or
content are irrelevant to the stop-hook decision. And in the same vein
should ulogd never write to it.

The one-null-byte write could previously lead to an out-of-bounds write
on plugins with a stop hook and zero-size private data.

Signed-off-by: Corubba Smith <corubba@gmx.de>
Signed-off-by: Florian Westphal <fw@strlen.de>
src/ulogd.c