diff options
author | Jan Beulich <[email protected]> | 2014-08-08 14:20:09 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2014-08-08 15:57:19 -0700 |
commit | 6e85bab6bc1019f9b87c53b32da3ad7791e7ddf9 (patch) | |
tree | 7f83156bdd6fa857286d224a3443dc5f481cbd74 /lib/mpi/mpi-cmp.c | |
parent | 3710f597aca5af4f605cda9793a8b2f0a42bc29a (diff) |
drivers/rtc/rtc-efi.c: check for invalid data coming back from UEFI
In particular seeing zero in eft->month is problematic, as it results in
-1 (converted to unsigned int, i.e. yielding 0xffffffff) getting passed
to rtc_year_days(), where the value gets used as an array index
(normally resulting in a crash). This was observed with the driver
enabled on x86 on some Fujitsu system (with possibly not up to date
firmware, but anyway).
Perhaps efi_read_alarm() should not fail if neither enabled nor pending
are set, but the returned time is invalid?
Signed-off-by: Jan Beulich <[email protected]>
Reported-by: Raymund Will <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Cc: Jingoo Han <[email protected]>
Acked-by: Lee, Chun-Yi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-cmp.c')
0 files changed, 0 insertions, 0 deletions