[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20210821171524.7F430C4338F@smtp.codeaurora.org>
Date: Sat, 21 Aug 2021 17:15:24 +0000 (UTC)
From: Kalle Valo <kvalo@...eaurora.org>
To: Len Baker <len.baker@....com>
Cc: Stanislav Yakovlev <stas.yakovlev@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Len Baker <len.baker@....com>, linux-wireless@...r.kernel.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ipw2x00: Use struct_size helper instead of open-coded
arithmetic
Len Baker <len.baker@....com> wrote:
> Dynamic size calculations (especially multiplication) should not be
> performed in memory allocator function arguments due to the risk of them
> overflowing. This could lead to values wrapping around and a smaller
> allocation being made than the caller was expecting. Using those
> allocations could lead to linear overflows of heap memory and other
> misbehaviors.
>
> To avoid this scenario, use the struct_size helper.
>
> Signed-off-by: Len Baker <len.baker@....com>
Patch applied to wireless-drivers-next.git, thanks.
6f78f4a41ee0 ipw2x00: Use struct_size helper instead of open-coded arithmetic
--
https://patchwork.kernel.org/project/linux-wireless/patch/20210717142513.5411-1-len.baker@gmx.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Powered by blists - more mailing lists