[lkml]   [1996]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: ext2 attribute immutable
On Wed, 3 Apr 1996, Zefram wrote:

> >> So, how does one need to modify /proc/1/mem to decrease the secure-level
> >> after getting root access? :)
> >
> >You don't need to. You can just do a ptrace() on init, or create your
> >OWN init process --- by using a careful, controlled fork bomb we can
> >easily create new processes until we are about to wrap pid, then kill
> >init and wait until one of our forks has a pid of 1.
> The fork attack shouldn't be possible. On SunOS, for example, when the
> PIDs wrap, they wrap to 101, not 1. Doesn't Linux do something like
> this? If it wraps to 1, this has to change -- conceptually, low PIDs
> are a privileged resource, so access to them must be restricted.

Testing this with a bash script, I counted the pid up to 32,750 and then did
'ps' manually until the pid wrapped. The pid did NOT wrap to 100 or 300, it
wrapped to '4'... skipping 1,2,3 which were taken.

So in linux, it wraps to 1, but seems to skip in-use pid's (which would
prevent the attack shown above.)

Using ps further, it seems to skip in use pid's in every assignment (ie not
just on wrap.)

To A Quick Young Fox:
Why jog exquisite bulk, fond crazy vamp,
Daft buxom jonquil, zephyr's gawky vice?
Guy fed by work, quiz Jove's xanthic lamp --
Zow! Qualms by deja vu gyp fox-kin thrice.
-- Lazy Dog

 \ /
  Last update: 2005-03-22 13:37    [W:0.111 / U:4.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site