]> git.ipfire.org Git - thirdparty/kmod.git/commit
libkmod: consider empty signature key as invalid
authorLucas De Marchi <lucas.demarchi@intel.com>
Wed, 18 Feb 2015 18:15:45 +0000 (16:15 -0200)
committerLucas De Marchi <lucas.demarchi@intel.com>
Wed, 18 Feb 2015 18:15:45 +0000 (16:15 -0200)
commitdcbe1846e824da3cc9facbb27691adb79cdee24a
tree39edd5c7fdad07b9ef9d60e35775f774a72bd17f
parent40ef6e69bb13522b961767d81f44aec0e83a7462
libkmod: consider empty signature key as invalid

A segmentation fault occurs if a module has an empty key attached to
its signature. This is mostly likely due to a corrupted module.

The crash happens because kmod_module_get_info() assumes that
kmod_module_signature_info() returns a signature of at least 1 byte.

The fix is based on a patch from Tobias Stoeckmann
<tobias@stoeckmann.org>, but rather than changing kmod_module_get_info()
to fix the crash, this changes kmod_module_signature_info() to
consider the signature as invalid.
libkmod/libkmod-signature.c