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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 17 Oct 2018 21:48:17 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     gustavo@...eddedor.com
Cc:     netanel@...zon.com, saeedb@...zon.com, zorik@...zon.com,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] net: ena: fix unintended sign extension

From: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
Date: Fri, 12 Oct 2018 21:49:48 +0200

> In the following expression:
> 
> 372                size = io_sq->bounce_buf_ctrl.buffer_size *
> 373                         io_sq->bounce_buf_ctrl.buffers_num;
> 
> both buffer_size and buffers_num are of type u16 (16 bits, unsigned),
> so they are promoted to type int (32 bits, signed) and then
> sign-extended to type size_t.
> 
> Fix this by casting io_sq->bounce_buf_ctrl.buffer_size to size_t in
> order to avoid the sign extension and unintended results.
> 
> Addresses-Coverity-ID: 1474187 ("Unintended sign extension")
> Addresses-Coverity-ID: 1474189 ("Unintended sign extension")
> Fixes: 689b2bdaaa14 ("net: ena: add functions for handling Low Latency Queues in ena_com")
> Signed-off-by: Gustavo A. R. Silva <gustavo@...eddedor.com>

I don't understand how this can possibly be a real problem, and it looks
therefore like we are just papering over a coverity warning.

I'm not applying this without more information and justification.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ