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>] [day] [month] [year] [list]
Message-ID: <20110728220026.GA25322@pintail.smokva.net>
Date:	Fri, 29 Jul 2011 00:00:27 +0200
From:	Petar Bogdanovic <petar@...kva.net>
To:	netdev@...r.kernel.org
Subject: drivers/net/tun.c: CAP_NET_ADMIN conditional not reached

Hi,

drivers/net/tun.c says:

    1004  if (((tun->owner != -1 && cred->euid != tun->owner) ||
    1005       (tun->group != -1 && !in_egroup_p(tun->group))) &&
    1006      !capable(CAP_NET_ADMIN))
    1007          return -EPERM;

this will skip !capable(CAP_NET_ADMIN) if tun->owner and tun->group are
both -1, which seems to be their default value (see lines 854,855).
ip(8) from iproute2 won't do any TUNSETOWNER/TUNSETGROUP ioctl() if no
uid and/or gid is supplied so when using `ip tuntap' as an unprivileged
user, you'll be unable to create a new tun(4) but won't have any
problems attaching to an existing device created without both user and
group options.

I'm not sure whether this is intentional since it has been around for
years.. although triggering it with tunctl(8) was not possible---tunctl
without `-u' seems to use 0 as the default value for TUNSETOWNER.


		Petar Bogdanovic
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ