Re: [PATCH] libkmod-signature: pkcs#7: fix crash when signer info is not present.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 8, 2018 at 10:10 AM Michal Suchanek <msuchanek@xxxxxxx> wrote:
>
> Reported-by: Kazuya Saito <saito.kazuya@xxxxxxxxxxxxxx>
> Signed-off-by: Michal Suchanek <msuchanek@xxxxxxx>
> ---
>  libkmod/libkmod-signature.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libkmod/libkmod-signature.c b/libkmod/libkmod-signature.c
> index fae074e6dd1d..782e96f69fef 100644
> --- a/libkmod/libkmod-signature.c
> +++ b/libkmod/libkmod-signature.c
> @@ -166,7 +166,7 @@ kmod_module_signature_info_pkcs7(const char *mem,

What's this based on? There's no such function in upstream


Lucas De Marchi

>         sig_info->key_id_len = cert->key_id_size;
>
>         sig_info->signer = cert->signer;
> -       sig_info->signer_len = strlen(cert->signer);
> +       sig_info->signer_len = cert->signer ? strlen(cert->signer) : 0;
>
>         sig_info->algo = NULL;
>         sig_info->hash_algo = cert->hash_algo;
> --
> 2.13.6
>


-- 
Lucas De Marchi
--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux