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]
Date: Mon, 16 Oct 2023 21:42:10 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Stephen Hemminger <stephen@...workplumber.org>
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, Oct 16, 2023 at 9:33 PM Stephen Hemminger
<stephen@...workplumber.org> wrote:
>
> 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.

Setting tfile->ifindex to zero should be a NOP ?

This means dev_index_reserve() will allocate a ifindex for us.

Not sure we want to prevent something that was working properly in the past.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ