IMHO the check is broken:
+ if (((tun->owner != -1 &&
+ current->euid != tun->owner) ||
+ (tun->group != -1 &&
+ current->egid != tun->group)) &&
+ !capable(CAP_NET_ADMIN))
return -EPERM;
It should be something like:
+ if (!((tun->owner == tun->owner) ||
+ (tun->group == tun->group) ||
+ capable(CAP_NET_ADMIN)))
return -EPERM;
Please verify and forward to the maintainers if my guess appears to be correct.