fix LVM2 creation_time > DateTime.MaxValue - #48
Conversation
…side BitDefender GravityZone (LVM2 2.02.145(2) (2016-03-04) on 4.4.5-gentoo-x86))
|
Note: I've scheduled a rebuild. Nuget timed out. |
|
@zivillian what is the exact value of the LVM2 volume in Bitdefenders case? |
|
I've attached the raw metadata as read from the disk: The relevant part part was already quoted in the initial description. |
|
Those are completely insane times. I'm looking at my own LVM setup currently, and as seen by Would it be possible for you to double check, and run Sidenote: The LVM header is all text .. ? .. Damn.. Let's hope it's always newline seperated... |
|
I don't have the credentials for this image, but I've attached the disk to an ubuntu 16.04 host and ran vgcfgbackup. This replaced one of the two timestamps by Int64.MaxValue. I guess, that the lvm was created by a broken version, but I wasn't able to find a specific patch or fix at the lvm2 repository. |
|
I've been reading some of the LVM2 tools code, and from what I gather, they'll just use the invalid time as is. They'll read it into an uint64, and then write it back out as is. If they ever use it for display, they'll get stuff like Example C code: It prints: |
The BitDefender GravityZone Virtual Disk contains an LVM2 which has an invalid creation time. This PR adds a check against DateTime.MaxValue to prevent an exception for this case.