FAT filesystem probing fails if a file's timestamp exceeds 2038

Bug #2098641 reported by dongzhou
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
New
Undecided
Unassigned
Focal
Won't Fix
Undecided
Unassigned
Jammy
In Progress
Undecided
Unassigned
grub2-unsigned (Ubuntu)
New
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Undecided
Unassigned
linux-bluefield (Ubuntu)
New
Undecided
Canonical Kernel Team
Focal
New
Undecided
Unassigned
Jammy
New
Undecided
Unassigned

Bug Description

[Impact]
If any file's timestamp under `/boot/efi` exceeds 2038, the FAT filesystem probe will fail, and the system will drop into the GRUB shell.

[Fix]
There is an upstream patch that fixes this issue:
https://git.savannah.gnu.org/cgit/grub.git/commit/grub-core/fs?id=e43f3d93b28cce852c110c7a8e40d8311bcd8bb1

[Test Plan]
1. Prepare an EFI partition in FAT format.
root@jammy:~# lsblk -f
vda
├─vda1
│ vfat FAT32 C34E-C891 1G 1% /boot/efi
├─vda2
│ ext4 1.0 0cbb726b-e9ac-47bf-8593-9ec43402076f 1.7G 7% /boot
└─vda3
     LVM2_m LVM2 eHoy3y-L7Fk-J4FQ-Fhlw-XXBR-C3xl-gQDAWo
  └─ubuntu--vg-ubuntu--lv
     ext4 1.0 78ec8d75-3ce6-4f09-abba-c6278aec36e7 79.7G 13% /

2. Change the timestamp of a directory under /boot/efi to exceed 2038:
touch -d "2038-02-27" /boot/efi/EFI

3. Reboot, and the system will be entered into the grub shell.

[Where problems could occur]
The patch simply bypasses the error logic when the modification time is zero in FAT.
There should be no regression unless the FAT filesystem is unable to handle such scenarios.

Tim Whisonant (tswhison)
affects: grub (Ubuntu) → grub2 (Ubuntu)
Chengen Du (chengendu)
Changed in grub2 (Ubuntu Focal):
status: New → Won't Fix
Chengen Du (chengendu)
summary: - grub 2.06 prob fat fs fail.
+ FAT filesystem probing fails if a file's timestamp exceeds 2038
description: updated
Chengen Du (chengendu)
description: updated
Revision history for this message
Chengen Du (chengendu) wrote :

Noble and later versions already include the patch.

Revision history for this message
Chengen Du (chengendu) wrote :

Debdiff for grub2 in Jammy

Revision history for this message
Chengen Du (chengendu) wrote :

Debdiff for grub2-unsigned in Jammy

Chengen Du (chengendu)
Changed in grub2 (Ubuntu Jammy):
status: New → In Progress
Changed in grub2-unsigned (Ubuntu Jammy):
status: New → In Progress
Revision history for this message
Julian Andres Klode (juliank) wrote :

Mate has cherry-picked the fix into the branch for the pending security update.

Tim Whisonant (tswhison)
Changed in linux-bluefield (Ubuntu):
assignee: nobody → Canonical Kernel Team (canonical-kernel-team)
Juerg Haefliger (juergh)
tags: added: kernel-daily-bug
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2-unsigned - 2.06-2ubuntu14.8

---------------
grub2-unsigned (2.06-2ubuntu14.8) jammy; urgency=medium

  * Drop NTFS patches that seem to be causing regressions
  * Source package generated from src:grub2 using make -f ./debian/rules
    generate-grub2-unsigned

 -- Mate Kukri <email address hidden> Mon, 17 Mar 2025 13:34:27 +0000

Changed in grub2-unsigned (Ubuntu Jammy):
status: In Progress → Fix Released
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "lp2098641-grub2-jammy.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2-unsigned - 2.06-2ubuntu14.8

---------------
grub2-unsigned (2.06-2ubuntu14.8) jammy; urgency=medium

  * Drop NTFS patches that seem to be causing regressions
  * Source package generated from src:grub2 using make -f ./debian/rules
    generate-grub2-unsigned

 -- Mate Kukri <email address hidden> Mon, 17 Mar 2025 13:34:27 +0000

Changed in grub2-unsigned (Ubuntu Focal):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.