Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1645047

Re: [PATCH] csiostor: Avoid content leaks and casts

From "Martin K. Petersen" <martin.petersen@oracle.com>
Newsgroups linux.kernel
Subject Re: [PATCH] csiostor: Avoid content leaks and casts
Date 2017-05-19 03:40 +0200
Message-ID <tIF3z-3cN-3@gated-at.bofh.it> (permalink)
References <tFlXs-82p-7@gated-at.bofh.it>
Organization Oracle Corporation

Show all headers | View raw


Varun,

You weren't CC:ed on this patch. Please review. Thanks!

> When copying attributes, the len argument was padded out and the
> resulting memcpy() would copy beyond the end of the source buffer.
> Avoid this, and use size_t for val_len to avoid all the
> casts. Similarly, avoid source buffer casts and use void *.
>
> Additionally enforces val_len can be represented by u16 and that the
> DMA buffer was not overflowed. Fixes the size of mfa, which is not
> FC_FDMI_PORT_ATTR_MAXFRAMESIZE_LEN (but it will be padded up to
> 4). This was noticed by the future CONFIG_FORTIFY_SOURCE checks.

https://patchwork.kernel.org/patch/9718995/

-- 
Martin K. Petersen	Oracle Linux Engineering

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH] csiostor: Avoid content leaks and casts "Martin K. Petersen" <martin.petersen@oracle.com> - 2017-05-19 03:40 +0200

csiph-web