[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: pid file security



On Tue, May 04, 2010 at 02:25:25AM -0400, Joey Hess wrote:
> Take a look in /var/run. Find a pid file that is owned by a non-root
> user. Now, look at the corresponding init script. What does it stop if
> that non-root user edited the pid file to contain '1'?

On Linux, nothing.  From kill(2):

  The only signals that can be sent to process ID 1, the init process,
  are those for which init has explicitly installed signal handlers.
  This is done to assure the system is not brought down accidentally.

Nevertheless, this could be a problem with other pids or on kfreebsd,
where the kernel will happily kill init and cause a panic.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187

Attachment: signature.asc
Description: Digital signature


Reply to: