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]
Message-ID: <1487512595.86943.112.camel@redhat.com>
Date:   Sun, 19 Feb 2017 08:56:35 -0500
From:   Doug Ledford <dledford@...hat.com>
To:     Arnd Bergmann <arnd@...db.de>,
        Mike Marciniszyn <mike.marciniszyn@...el.com>,
        Dennis Dalessandro <dennis.dalessandro@...el.com>
Cc:     Sean Hefty <sean.hefty@...el.com>,
        Hal Rosenstock <hal.rosenstock@...il.com>,
        Ira Weiny <ira.weiny@...el.com>,
        Jubin John <jubin.john@...el.com>,
        Jianxin Xiong <jianxin.xiong@...el.com>,
        linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] IB/hfi1: use size_t for passing array length

On Tue, 2017-02-14 at 22:23 +0100, Arnd Bergmann wrote:
> gcc-7 produces a mysterious warning about the size argument being
> potentially out
> of range:
> 
> drivers/infiniband/hw/hfi1/verbs.c: In function 'init_cntr_names':
> drivers/infiniband/hw/hfi1/verbs.c:1644:2: error: 'memcpy': specified
> size between 18446744071562067968 and 18446744073709551615 exceeds
> maximum object size 9223372036854775807 [-Werror=stringop-overflow=]
> 
> This seems to refer to a the case where an 64-bit size_t gets
> truncated
> into a negative 'int' and subsequently turned into a high 64-bit
> number
> again.
> 
> The fix is clearly to use size_t here, which matches the type that
> gets
> used for this value elsewhere.
> 
> Fixes: b7481944b06e ("IB/hfi1: Show statistics counters under IB
> stats interface")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Thanks, applied.

-- 
Doug Ledford <dledford@...hat.com>
    GPG KeyID: B826A3330E572FDD
   
Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ