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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160901080255.GA2386@localhost.localdomain>
Date:   Thu, 1 Sep 2016 10:02:55 +0200
From:   Richard Cochran <richardcochran@...il.com>
To:     John Stultz <john.stultz@...aro.org>
Cc:     lkml <linux-kernel@...r.kernel.org>,
        Vegard Nossum <vegard.nossum@...cle.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...nel.org>,
        Prarit Bhargava <prarit@...hat.com>
Subject: Re: [PATCH 4/6] time: Avoid undefined behaviour in
 timespec64_add_safe()

On Wed, Aug 31, 2016 at 02:50:20PM -0700, John Stultz wrote:
>     UBSAN: Undefined behaviour in kernel/time/time.c:783:2
>     signed integer overflow:
>     5273 + 9223372036854771711 cannot be represented in type 'long int'

...

> Line 783 is this:
> 
> 783         set_normalized_timespec64(&res, lhs.tv_sec + rhs.tv_sec,
> 784                         lhs.tv_nsec + rhs.tv_nsec);

...

> Note that this is not currently a huge concern since the kernel should be
> built with -fno-strict-overflow by default, but could be a problem in the
> future, a problem with older compilers, or other compilers than gcc.

Is this really a concern at all?  The value 9223372036854771711 is a
huge number of seconds.

Thanks,
Richard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ