Re: Linux 2.2.3ac1

Topi Miettinen (Topi.Miettinen@medialab.sonera.fi)
Thu, 11 Mar 1999 22:47:55 +0200


The ptrace fix in 2.2.3ac1 still allows less capable, but CAP_SYS_PTRACE
capability possessing processes to ptrace more capable processes. IMHO it
would be better to require that the ptracing process has equal or more
capabilities. Otherwise, CAP_SYS_PTRACE would be close to CAP_SYS_SETPCAP.

Also, looking at cap_issubset definition, there's a ! missing before
cap_issubset().

include/linux/capability.h:
#define cap_issubset(a,set) (!(cap_t(a) & ~cap_t(set)))

[example: a=maxcap=0xff, set=cap_ptrace=1: !(ff & ~1) = !(ff & fe) = !fe = 0]

-Topi

Clip from ac1:
(current->uid != child->uid) ||
(current->gid != child->egid) ||
(current->gid != child->sgid) ||
+ (cap_issubset(child->cap_permitted, current->cap_permitted))
||
(current->gid != child->gid)) && !capable(CAP_SYS_PTRACE))
goto out;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/