[libvirt PATCH v2 2/2] qemu_migration_cookie: Properly fetch cert DN

Michal Prívozník mprivozn at redhat.com
Fri Feb 11 13:35:40 UTC 2022


On 2/11/22 13:29, Jiri Denemark wrote:
> If 1024 was not enough to fit the DN, gnutls_x509_crt_get_dn would store
> the required size in subjectlen. And since we're not checking the return
> value of this function, we would happily overwrite some random memory.
> 
> Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
> ---
> 
> Notes:
>     Version 2:
>     - do not pass NULL to the first gnutls_x509_crt_get_dn call
> 
>  src/qemu/qemu_migration_cookie.c | 20 ++++++++++++++------
>  1 file changed, 14 insertions(+), 6 deletions(-)
> 

Reviewed-by: Michal Privoznik <mprivozn at redhat.com>

Michal




More information about the libvir-list mailing list