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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231016123319.688bbd91@hermes.local>
Date: Mon, 16 Oct 2023 12:33:19 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Eric Dumazet <edumazet@...gle.com>
Cc: "David S . Miller" <davem@...emloft.net>, Jakub Kicinski
 <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
 eric.dumazet@...il.com, syzbot <syzkaller@...glegroups.com>
Subject: Re: [PATCH net] tun: prevent negative ifindex

On Mon, 16 Oct 2023 18:08:51 +0000
Eric Dumazet <edumazet@...gle.com> wrote:

> +		ret = -EINVAL;
> +		if (ifindex < 0)
> +			goto unlock;

Shouldn't this be <= 0 since 0 is not a valid ifindex.
Zero ifindex is used as a sentinel in some API's

For example: if_nametoindex() returns 0 if name is not found.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ