Re: [PATCH] libkmod-signature: Fix crash when module signature is not present.
From: Michal Suchánek <hidden>
Date: 2018-03-13 09:57:39
From: Michal Suchánek <hidden>
Date: 2018-03-13 09:57:39
On Mon, 12 Mar 2018 22:41:19 +0200 Yauheni Kaliuta [off-list ref] wrote:
Hi, Michal!quoted
quoted
quoted
quoted
quoted
On Thu, 8 Mar 2018 19:14:26 +0100, Michal Suchanek wrote:> The mod_sig is allocated on stack and when no signature is present > it is not initialized and contains garbage. Later when freeing > mod_sig garbage pointer is dereferenced. I guess, it is enough to init the structure.
Yes, it is enough to initialize the structure. However, this issue is caused by the awkward interface to the kmod_module_signature_info function so changing the interface should prevent such errors in the future. Thanks Michal