Skip to content
  • Andrzej Zaborowski's avatar
    efi-pstore: Fix an overflow on 32-bit builds · 783ee431
    Andrzej Zaborowski authored
    
    
    In generic_id the long int timestamp is multiplied by 100000 and needs
    an explicit cast to u64.
    
    Without that the id in the resulting pstore filename is wrong and
    userspace may have problems parsing it, but more importantly files in
    pstore can never be deleted and may fill the EFI flash (brick device?).
    This happens because when generic pstore code wants to delete a file,
    it passes the id to the EFI backend which reinterpretes it and a wrong
    variable name is attempted to be deleted.  There's no error message but
    after remounting pstore, deleted files would reappear.
    
    Signed-off-by: default avatarAndrew Zaborowski <andrew.zaborowski@intel.com>
    Acked-by: default avatarDavid Rientjes <rientjes@google.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
    783ee431