Commit 7e73f517 authored by Jonas 'Sortie' Termansen's avatar Jonas 'Sortie' Termansen Committed by Greg Kroah-Hartman
Browse files

isofs: fix Y2038 and Y2156 issues in Rock Ridge TF entry



[ Upstream commit 5ea45f54 ]

This change implements the Rock Ridge TF entry LONG_FORM bit, which uses
the ISO 9660 17-byte date format (up to year 9999, with 10ms precision)
instead of the 7-byte date format (up to year 2155, with 1s precision).

Previously the LONG_FORM bit was ignored; and isofs would entirely
misinterpret the date as the wrong format, resulting in garbage
timestamps on the filesystem.

The Y2038 issue in iso_date() is fixed by returning a struct timespec64
instead of an int.

parse_rock_ridge_inode_internal() is fixed so it does proper bounds
checks of the TF entry timestamps.

Signed-off-by: default avatarJonas 'Sortie' Termansen <sortie@maxsi.org>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20250411145022.2292255-1-sortie@maxsi.org


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 4b338311
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment