summaryrefslogtreecommitdiff
path: root/drivers/rtc/interface.c
diff options
context:
space:
mode:
authorJan Beulich <JBeulich@suse.com>2014-08-08 14:20:09 -0700
committerJiri Slaby <jslaby@suse.cz>2014-08-26 14:12:25 +0200
commit33751b9ed01ee46fd1c20cf8c42c396704d88b28 (patch)
tree0d0bf5b3330b3ee695c2e95ef045e756ec393f48 /drivers/rtc/interface.c
parente7afccd211af3976fd1c874d9aea7dee0005921e (diff)
downloadlwn-33751b9ed01ee46fd1c20cf8c42c396704d88b28.tar.gz
lwn-33751b9ed01ee46fd1c20cf8c42c396704d88b28.zip
drivers/rtc/rtc-efi.c: check for invalid data coming back from UEFI
commit 6e85bab6bc1019f9b87c53b32da3ad7791e7ddf9 upstream. 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 <jbeulich@suse.com> Reported-by: Raymund Will <rw@suse.de> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Jingoo Han <jg1.han@samsung.com> Acked-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'drivers/rtc/interface.c')
0 files changed, 0 insertions, 0 deletions