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]
Message-Id: <20180724.113650.740665928630154623.davem@davemloft.net>
Date:   Tue, 24 Jul 2018 11:36:50 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     tariqt@...lanox.com
Cc:     netdev@...r.kernel.org, eranbe@...lanox.com,
        xiyou.wangcong@...il.com
Subject: Re: [PATCH net-next v2] net: remove redundant input checks in
 SIOCSIFTXQLEN case of dev_ifsioc

From: Tariq Toukan <tariqt@...lanox.com>
Date: Tue, 24 Jul 2018 13:53:00 +0300

> The cited patch added a call to dev_change_tx_queue_len in
> SIOCSIFTXQLEN case.
> This obsoletes the new len comparison check done before the function call.
> Remove it here.
> 
> For the desicion of keep/remove the negative value check, we examine the
> range check in dev_change_tx_queue_len.
> On 64-bit we will fail with -ERANGE.  The 32-bit int ifr_qlen will be sign
> extended to 64-bits when it is passed into dev_change_tx_queue_len(). And
> then for negative values this test triggers:
> 
> 	if (new_len != (unsigned int)new_len)
> 		return -ERANGE;
> 
> because:
> 	if (0xffffffffWHATEVER != 0x00000000WHATEVER)
> 
> On 32-bit the signed value will be accepted, changing behavior.
> 
> Therefore, the negative value check is kept.
> 
> Fixes: 3f76df198288 ("net: use dev_change_tx_queue_len() for SIOCSIFTXQLEN")
> Signed-off-by: Tariq Toukan <tariqt@...lanox.com>
> Reviewed-by: Eran Ben Elisha <eranbe@...lanox.com>

Applied, thank you.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ