All of lore.kernel.org
 help / color / mirror / Atom feed
* Horrible denial of service bug in autmount 5
@ 2008-06-20 13:24 Anton Altaparmakov
  2008-06-20 13:44 ` Ian Kent
  0 siblings, 1 reply; 39+ messages in thread
From: Anton Altaparmakov @ 2008-06-20 13:24 UTC (permalink / raw)
  To: autofs; +Cc: H. Peter Anvin, Unix Support, Ian Kent

Hi,

The autofs 5.0.2 package that comes with opensuse 10.3 has a nasty  
denial of service attack in the automount daemon.  I can only assume  
that the code comes from the actual autofs source rather than being  
introduced by opensuse but I could be wrong (I haven't checked).

The bug is that automount searches /proc/*/cmdline for a substring  
that matches "automount" and refuses to run if it finds such a thing.

So any user that just does:

cat > automount.c <<EOD
int main(void)
{
	sleep(10000);
	return 0;
}
EOD
gcc -o automount.c
export PATH=.;$PATH
automount

And now no-one can run the real automount including root!

Even if this was not a DoS waiting to happen, why do you have this  
check in the code?  There is no reason whatsoever to try and restrict  
people from running multiple instances of the automount process...

We in fact run one automount instance for each logged in user on our  
Linux distribution for Cambridge University. - We now have to play  
silly buggers with running automount in such a way as to replace its  
argv[0] with a different string so we can run multiple instances.

But that still leaves the DoS attack that any user can run a program  
as above and no-one else will be able to log in any more as the  
automount process will find the literal string "automount" from the  
user's executable...

So we would really like the complete abomination that is autofs/daemon/ 
automount.c::is_automount_running() thrown away or at least made  
optional with a command line option if you insist on having it, pretty  
please with sugar on top?

Best regards,

	Anton
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer, http://www.linux-ntfs.org/

^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2008-06-24 19:18 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-20 13:24 Horrible denial of service bug in autmount 5 Anton Altaparmakov
2008-06-20 13:44 ` Ian Kent
2008-06-20 14:01   ` Anton Altaparmakov
2008-06-20 15:04     ` Ian Kent
2008-06-20 15:24       ` Anton Altaparmakov
2008-06-20 15:28         ` Ian Kent
2008-06-20 15:49           ` J.P. King
2008-06-20 16:07             ` Ian Kent
2008-06-20 16:22               ` J.P. King
2008-06-20 16:27                 ` Ian Kent
2008-06-20 17:03           ` H. Peter Anvin
2008-06-20 18:22             ` Ian Kent
2008-06-20 19:03               ` H. Peter Anvin
2008-06-21  2:43                 ` Ian Kent
2008-06-21  4:27                   ` H. Peter Anvin
2008-06-21  4:44                     ` Ian Kent
2008-06-21  4:54                       ` H. Peter Anvin
2008-06-21  9:18                       ` J.P. King
2008-06-23  1:53                         ` Ian Kent
2008-06-23  2:26                           ` J.P. King
2008-06-23  1:08                             ` H. Peter Anvin
2008-06-23  5:33                               ` Jim Carter
2008-06-23  8:06                               ` Anton Altaparmakov
2008-06-23  9:03                                 ` Ian Kent
2008-06-23  9:12                                   ` Ian Kent
2008-06-23  9:18                                     ` Ian Kent
2008-06-24  1:08                                 ` Jim Carter
2008-06-24  7:27                                   ` Anton Altaparmakov
2008-06-24  7:38                                     ` Ian Kent
2008-06-24  8:08                                       ` Anton Altaparmakov
2008-06-24 18:46                                         ` Jim Carter
2008-06-24 18:55                                     ` Jim Carter
2008-06-24 19:18                                       ` Anton Altaparmakov
2008-06-23  2:40                             ` Ian Kent
2008-06-23  2:55                               ` J.P. King
2008-06-23  3:10                                 ` Ian Kent
2008-06-23  7:15                                   ` Anton Altaparmakov
2008-06-23  7:45                                     ` Ian Kent
2008-06-23  5:27                           ` Jim Carter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.