New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 768042 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

ec: Setting rtc alarm > 86400 shouldn't crash

Project Member Reported by philipchen@chromium.org, Sep 22 2017

Issue description

For boards using stm32 rtc as the system rtc, running 'ectool rtcsetalarm 86401' could crash ec.
A user shouldn't be able to crash ec so easily.

 
By the way, misuse of ectool can crash your system; I think that's expected. But it sounds like it uncovered a bug, so that's good. 
Yeah, the bug's not really about ectool. This interface is exposed via the kernel RTC interface. We don't expect timers to be able to kill the system.
Project Member

Comment 3 by bugdroid1@chromium.org, Dec 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/e2a9ede352111e0943377a275accf4a13c71d777

commit e2a9ede352111e0943377a275accf4a13c71d777
Author: Philip Chen <philipchen@google.com>
Date: Thu Dec 07 01:30:47 2017

chip/stm32/clock: Handle illegal alarm timeout gracefully

Even if we set the rtc alarm timeout for more than 86400 secs,
we should not crash the system.

BUG= chromium:768042 
BRANCH=none
TEST=on AP console, do 'ectool rtcsetalarm 99999' and
then see 'EC result 3 (INVALID_PARAM)' without crash.

Change-Id: Ic0fa92ff101bce1f4791221c4e1eadaf7a005355
Signed-off-by: Philip Chen <philipchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/807624
Commit-Ready: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>

[modify] https://crrev.com/e2a9ede352111e0943377a275accf4a13c71d777/chip/stm32/clock-f.c

Status: Fixed (was: Untriaged)

Sign in to add a comment