linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] staging/rtl8192u: Prefer kcalloc over open coded arithmetic
@ 2021-08-22 14:28 Len Baker
  2021-08-22 14:28 ` [PATCH 1/2] staging/rtl8192u: Avoid CamelCase in names of variables Len Baker
  2021-08-22 14:28 ` [PATCH 2/2] staging/rtl8192u: Prefer kcalloc over open coded arithmetic Len Baker
  0 siblings, 2 replies; 7+ messages in thread
From: Len Baker @ 2021-08-22 14:28 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Len Baker, Kees Cook, Michael Straube, Lee Jones, linux-staging,
	linux-kernel, linux-hardening

The main reason of this patch serie is to avoid dynamic size
calculations (especially multiplication) 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.

However, there is a previous patch to avoid CamelCase in the name of
variables.

Len Baker (2):
  staging/rtl8192u: Avoid CamelCase in names of variables
  staging/rtl8192u: Prefer kcalloc over open coded arithmetic

 drivers/staging/rtl8192u/r819xU_phy.c | 92 +++++++++++++--------------
 1 file changed, 44 insertions(+), 48 deletions(-)

--
2.25.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-08-23  8:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-22 14:28 [PATCH 0/2] staging/rtl8192u: Prefer kcalloc over open coded arithmetic Len Baker
2021-08-22 14:28 ` [PATCH 1/2] staging/rtl8192u: Avoid CamelCase in names of variables Len Baker
2021-08-22 15:02   ` Kees Cook
2021-08-23  8:54     ` Dan Carpenter
2021-08-22 14:28 ` [PATCH 2/2] staging/rtl8192u: Prefer kcalloc over open coded arithmetic Len Baker
2021-08-22 14:59   ` Kees Cook
2021-08-22 15:41     ` Len Baker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).