udf: udftime: prevent overflow in udf_disk_stamp_to_time()
authorRoman Smirnov <r.smirnov@omp.ru>
Wed, 27 Mar 2024 13:27:55 +0000 (16:27 +0300)
committerJan Kara <jack@suse.cz>
Wed, 10 Apr 2024 11:10:12 +0000 (13:10 +0200)
commit3b84adf460381169c085e4bc09e7b57e9e16db0a
tree55a1b62160e32e17cb33f76096015ef09cdb9679
parent3e90417f41f41a7d4a6d5ee0ca216698e9ab4381
udf: udftime: prevent overflow in udf_disk_stamp_to_time()

An overflow can occur in a situation where src.centiseconds
takes the value of 255. This situation is unlikely, but there
is no validation check anywere in the code.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Roman Smirnov <r.smirnov@omp.ru>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Jan Kara <jack@suse.cz>
Message-Id: <20240327132755.13945-1-r.smirnov@omp.ru>
fs/udf/udftime.c