lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 26 Nov 2014 13:28:11 -0800
From:	John Stultz <john.stultz@...aro.org>
To:	Fengguang Wu <fengguang.wu@...el.com>
Cc:	"pang.xunlei" <pang.xunlei@...aro.org>, LKP <lkp@...org>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [time] WARNING: CPU: 0 PID: 1 at kernel/time/timekeeping.c:1337 update_wall_time()

On Wed, Nov 26, 2014 at 12:00 PM, Fengguang Wu <fengguang.wu@...el.com> wrote:
> Greetings,
>
> 0day kernel testing robot got the below dmesg and the first bad commit is
>
> git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
>
> commit 6067dc5a8c2b1b57e67eaf1125db1d63c1ed6361
> Author:     pang.xunlei <pang.xunlei@...aro.org>
> AuthorDate: Wed Oct 8 15:03:34 2014 +0800
> Commit:     John Stultz <john.stultz@...aro.org>
> CommitDate: Fri Nov 21 11:59:56 2014 -0800
>
>     time: Avoid possible NTP adjustment mult overflow.
>
>     Ideally, __clocksource_updatefreq_scale, selects the largest shift
>     value possible for a clocksource. This results in the mult memember of
>     struct clocksource being particularly large, although not so large
>     that NTP would adjust the clock to cause it to overflow.
>
>     That said, nothing actually prohibits an overflow from occuring, its
>     just that it "shouldn't" occur.
>
>     So while very unlikely, and so far never observed, the value of
>     (cs->mult+cs->maxadj) may have a chance to reach very near 0xFFFFFFFF,
>     so there is a possibility it may overflow when doing NTP positive
>     adjustment
>
>     See the following detail: When NTP slewes the clock, kernel goes
>     through update_wall_time()->...->timekeeping_apply_adjustment():
>         tk->tkr.mult += mult_adj;
>
>     Since there is no guard against it, its possible tk->tkr.mult may
>     overflow during this operation.
>
>     This patch avoids any possible mult overflow by judging the overflow
>     case before adding mult_adj to mult, also adds the WARNING message
>     when capturing such case.
>
>     Signed-off-by: pang.xunlei <pang.xunlei@...aro.org>
>     [jstultz: Reworded commit message]
>     Signed-off-by: John Stultz <john.stultz@...aro.org>


So you caught this false-positive issue in my tree, unfortunately just
mintes before it was pulled into -tip. :)

I've since submitted a fix which was pulled into -tip just the other
day, but looks like it isn't yet in the current -next.
See:
http://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit/?h=timers/core&id=cb2aa63469f81426c7406227be70b628b42f7a05

It should go away as soon as that patch lands in -next, but do let me
know if you continue to see this.

thanks
-john
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ