From: Kalle Valo <kvalo@codeaurora.org>
To: Len Baker <len.baker@gmx.com>
Cc: Stanislav Yakovlev <stas.yakovlev@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Len Baker <len.baker@gmx.com>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ipw2x00: Use struct_size helper instead of open-coded arithmetic
Date: Sat, 21 Aug 2021 17:15:24 +0000 (UTC) [thread overview]
Message-ID: <20210821171524.7F430C4338F@smtp.codeaurora.org> (raw)
In-Reply-To: <20210717142513.5411-1-len.baker@gmx.com>
Len Baker <len.baker@gmx.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@gmx.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
prev parent reply other threads:[~2021-08-21 17:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-17 14:25 [PATCH] ipw2x00: Use struct_size helper instead of open-coded arithmetic Len Baker
2021-07-21 10:20 ` Stanislav Yakovlev
2021-08-21 17:15 ` Kalle Valo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210821171524.7F430C4338F@smtp.codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=len.baker@gmx.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stas.yakovlev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.