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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181025070816.3e77nr25mskrkzqg@mwanda>
Date:   Thu, 25 Oct 2018 10:08:16 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Juergen Gross <jgross@...e.com>
Cc:     Dave Hansen <dave.hansen@...ux.intel.com>,
        Andy Lutomirski <luto@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        "H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] x86/ioremap: tighten integer overflow checking



On Thu, Oct 25, 2018 at 08:28:44AM +0200, Juergen Gross wrote:
> On 25/10/2018 08:16, Dan Carpenter wrote:
> > The current check is a bit off in the case where "phys_addr + size"
> > wraps to zero because then "last_addr" is set to ULONG_MAX which is >=
> > phys_addr.
> 
> And -2 would be okay?
> 

If you see any patches from me it's static checker stuff...

I guess the original is actually fine because the -1 re-wraps back to
what we wanted it to be.  We also do verify that size is correct in
__ioremap_check_mem() so I can't see a problem here after all.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ