Re: /proc/sys/kernel/pid_max issues

From: Ingo Molnar (mingo_at_elte.hu)
Date: 09/14/04

  • Next message: John Levon: "[PATCH] fix OProfile locking"
    Date:	Tue, 14 Sep 2004 17:32:14 +0200
    To: Albert Cahalan <albert@users.sf.net>
    
    

    * Albert Cahalan <albert@users.sf.net> wrote:

    > > > I'd much prefer LRU allocation. There are
    > > > lots of system calls that take PID values.
    > > > All such calls are hazardous. They're pretty
    > > > much broken by design.
    > >
    > > this is a pretty sweeping assertion. Would you
    > > care to mention a few examples of such hazards?
    >
    > kill(12345,9)
    > setpriority(PRIO_PROCESS,12345,-20)
    > sched_setscheduler(12345, SCHED_FIFO, &sp)
    >
    > Prior to the call being handled, the process may
    > die and be replaced. Some random innocent process,
    > or a not-so-innocent one, will get acted upon by
    > mistake. This is broken and dangerous.

    easy to fix: SIGSTOP the task, check it's really
    the one you want and then do the setpriority /
    setscheduler call and SIGCONT it. Any privileged
    code that is about to spread some of its privileges
    via asynchronous system-calls need to be careful.

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


  • Next message: John Levon: "[PATCH] fix OProfile locking"

    Relevant Pages

    • Re: /proc/sys/kernel/pid_max issues
      ... Some random innocent process, ... >> mistake. ... > code that is about to spread some of its privileges ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm2-V0.7.30-2
      ... - boot / telinit 5 OK ... - su'd to get privileges ... - started scripts to record data ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] [request for inclusion] Realtime LSM
      ... users to tie up resources. ... > a nice way to handle privileges for these guys. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: uselib() & 2.6.X?
      ... > loaders' uselibfunctions that allow local users to gain root ... > privileges. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: 2.6.11-rc3-mm2
      ... >>issue that has a much wider potential audience than pro audio users, ... > the system after giving out RT privileges. ... specified users when running specified programs would have wider ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)