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:   Tue, 22 Jun 2021 14:09:33 -0300
From:   Jason Gunthorpe <jgg@...dia.com>
To:     Kees Cook <keescook@...omium.org>
Cc:     Doug Ledford <dledford@...hat.com>, linux-kernel@...r.kernel.org,
        linux-rdma@...r.kernel.org, linux-api@...r.kernel.org,
        linux-hardening@...r.kernel.org
Subject: Re: [PATCH] RDMA/core: Use flexible array for mad data

On Wed, Jun 16, 2021 at 01:26:15PM -0700, Kees Cook wrote:
> In preparation for FORTIFY_SOURCE performing compile-time and run-time
> field bounds checking for memcpy(), memmove(), and memset(), avoid
> intentionally read across neighboring array fields.
> 
> Without a flexible array, this looks like an attempt to perform a
> memcpy() read beyond the end of the packet->mad.data array:
> 
> drivers/infiniband/core/user_mad.c:
> 	memcpy(packet->msg->mad, packet->mad.data, IB_MGMT_MAD_HDR);
> 
> Switch from [0] to [] to use the appropriately handled type for trailing
> bytes.
> 
> Signed-off-by: Kees Cook <keescook@...omium.org>
> ---
>  include/uapi/rdma/ib_user_mad.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-next, thanks

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ