mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* incorrect tracking of /proc/*/exe for overwritten running processes
@ 2007-06-07  0:58 Mike Frysinger
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2007-06-07  0:58 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: dsd

looking at a simple program:
int main()
{
  if (fork()) return 0;
  printf("pid = %i\n", getpid());
  while (1) sleep(3600);
}

and where my / and /var/tmp are on the same partition:

# gcc test.c -o /usr/sbin/MOO
# /usr/sbin/MOO
pid = 17144
# readlink /proc/17144/exe
/usr/sbin/MOO

# gcc test.c -o /var/tmp/MOO
# mv /var/tmp/MOO /usr/sbin/MOO
# readlink /proc/17144/exe
/var/tmp/MOO (deleted)

i feel like the new exe link should actually read:
/usr/sbin/MOO (deleted)
otherwise people can easily get confused as they think their daemon
was started in /var/tmp/ and their machine was compromised

# uname -a
Linux vapier 2.6.21.3 #4 SMP PREEMPT Sat Jun 2 09:55:10 EDT 2007
x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ AuthenticAMD
GNU/Linux
-mike

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-06-07  0:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-07  0:58 incorrect tracking of /proc/*/exe for overwritten running processes Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®