lkml.org 
[lkml]   [2020]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] efi: fix a race and a buffer overflow while reading efivars via sysfs
Hello, Joey, all,

> > - var->DataSize = 1024;
> > - if (efivar_entry_get(entry, &entry->var.Attributes,
> > - &entry->var.DataSize, entry->var.Data))
> > + ret = efivar_entry_get(entry, &var->Attributes, &datasize, var->Data);
> > + var->DataSize = size;
>
> The size is indeterminate here. I think that it should uses datasize?
> var->DataSize = datasize;

Indeed, my mistake. Thank you much! I will fix it in the v3 patchset I'm
currently composing.

Best regards,
Vladis Dronov | Red Hat, Inc. | The Core Kernel | Senior Software Engineer

\
 
 \ /
  Last update: 2020-03-05 07:17    [W:0.481 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site