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  PHC 
Open Source and information security mailing list archives
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 24 Aug 2021 09:25:42 +0200
From:   Len Baker <>
To:     Greg Kroah-Hartman <>,
        Kees Cook <>
Cc:     Len Baker <>,
        Dan Carpenter <>,
        Michael Straube <>,
        Lee Jones <>,,,
Subject: [PATCH v2 0/3] staging/rtl8192u: Prefer kcalloc over open coded arithmetic

The main reason of this patch serie is to avoid size calculations
(especially multiplication) in memory allocator function arguments due
to the risk of them overflowing [1]. 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.

At the same time, take the opportunity to refactor the function avoiding
CamelCase in the name of variables and moving some initializations to
the variables definition block.


Changelog v1 -> v2
- Split the CamelCase refactoring and the moving of initializations in
  two separate commits (Kees Cook).
- Link to the documentation to clarify the change in the 3/3 patch (Kees
- Modify the commit message to clarify in the 3/3 patch that these
  changes are not dynamic sizes but it is best to do the change to keep
  the open-coded math idiom out of code (Kees Cook).

Len Baker (3):
  staging/rtl8192u: Avoid CamelCase in names of variables
  staging/rtl8192u: Initialize variables in the definition block
  staging/rtl8192u: Prefer kcalloc over open coded arithmetic

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


Powered by blists - more mailing lists