[Bug 195868] New: Integer overflow in kern/subr_clock.c : clock_ct_to_ts() [patch]

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Dec 11 02:14:51 UTC 2014


            Bug ID: 195868
           Summary: Integer overflow in kern/subr_clock.c :
                    clock_ct_to_ts() [patch]
           Product: Base System
           Version: 10.1-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: leo at sai.msu.ru

Created attachment 150452
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=150452&action=edit
Patch for integer overflow

How to repeat: set RTC 99 year by BIOS
Result: Error message "Invalid time in real time clock" in system log
Expected: system time must be set to 2099

Integer overflow for case sizeof(time_t) > 4 at operator:
clock_ct_to_ts(struct clocktime *ct, struct timespec *ts)
        time_t secs;
        int i, year, days;
        secs = ((days * 24 + ct->hour) * 60 + ct->min) * 60 + ct->sec;

You are receiving this mail because:
You are the assignee for the bug.

More information about the freebsd-bugs mailing list