Skip to contentSkip to conversation

PROBLEM: old exploit works!!!

DISCUSSION Manfred Spraul 1 participant 1 message Oct 9, 2001

lore
Share & tools
lore
#0 lore raw
Quoted 9 lines

Old exploit which works on kernels up to 2.2.18 (itr doesn't work on 2.2.19) works on 2.4.9!!
I attach that exploit.
[snip]
if (check_execve(victim, filename))

	goto exit;

(void)waitpid(victim, NULL, WUNTRACED);
if (ptrace(PTRACE_CONT, victim, 0, 0)) {

It doesn't work, only the behaviour changed:
Linux now ignores the setuid bit if you try to ptrace a setuid app (idea from FreeBSD).
Up to 2.2.18 [and 2.4.0-pre?], it tried to return an error message if you try to ptrace a setuid app, and there was a race window between the test (must be early, since it tries to return an error code) and the actual uid change. I haven't checked how it was fixed in 2.2.19.

--
Manfred