lists.openwall.net   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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 21 Jul 2021 14:20:45 +0400
From:   Stanislav Yakovlev <stas.yakovlev@...il.com>
To:     Len Baker <len.baker@....com>
Cc:     Kalle Valo <kvalo@...eaurora.org>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        wireless <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

On Sat, 17 Jul 2021 at 18:25, 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>
> ---
>  drivers/net/wireless/intel/ipw2x00/libipw_tx.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>

Looks fine, thanks!

Stanislav.

Powered by blists - more mailing lists