GNU GRUB - Bugs: bug #63894, grub_datetime2unixtime() still has...
You are not allowed to post comments on this tracker with your current authentication level.
bug #63894: grub_datetime2unixtime() still has the year 2038 problem.
Submitter: | Masayuki Moriyama <moriyama> | ||
Submitted: | Wed 08 Mar 2023 11:04:29 AM UTC | ||
Category: | Filesystem | Severity: | Major |
Priority: | 5 - Normal | Item Group: | Software Error |
Status: | None | Privacy: | Public |
Assigned to: | None | Originator Name: | |
Open/Closed: | Open | Release: | Git master |
Release: | Reproducibility: | Every Time | |
Planned Release: | None |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
No changes have been made to this item
I found two problems in the grub_datetime2unixtime() function.
Problem 1:
The grub_datetime2unixtime() function returns a 64-bit integer unixtime as the second argument, but the variable used for internal calculation is a 32-bit integer variable.
Problem 2:
Year exceeding the unixtime 32-bit integer value is regarded as an error.
include/grub/datetime.h:
Due to these problems, the "grub-probe --device DEVICE --target=fs" command cannot recognize the FAT file system if there are directories or files dated after January 19, 2038 in the / directory of the FAT file system.
Steps to Reproduce:
Run on Fedora 36 Workstation Live image.
Fedora 37 Workstation Live image does not reproduce any problems because commit e43f3d93b28cce852c110c7a8e40d8311bcd8bb1 (fs/fat: Don't error when mtime is 0) is applied.