Package: telnetd
Version: 0.17-36
Severity: normal

I have the following line in my inetd.conf:

   telnet          stream  tcp4    nowait          nobody  /usr/sbin/in.telnetd 
   in.telnetd      -hL /etc/rc.telnet

If /etc/rc.telnet contains this:

   #!/bin/sh
   echo hi

And I telnet to the machine, I get "hi" as output and the connection stays
open, with in.telnetd using a lot of cpu time and having a zombie child
(rc.telnet).

Strace shows it is calling select and read in a tight loop:

   select(4, [0 3], [], [0], NULL)         = 1 (in [3])
   read(3, 0x60b5e0, 8192)                 = -1 EIO (Input/output error)
   select(4, [0 3], [], [0], NULL)         = 1 (in [3])
   read(3, 0x60b5e0, 8192)                 = -1 EIO (Input/output error)
   select(4, [0 3], [], [0], NULL)         = 1 (in [3])
   read(3, 0x60b5e0, 8192)                 = -1 EIO (Input/output error)
   select(4, [0 3], [], [0], NULL)         = 1 (in [3])
   read(3, 0x60b5e0, 8192)                 = -1 EIO (Input/output error)

If I add a "sleep 1" to rc.telnet, then the connection is closed properly,
so there seems to be a race condition somewhere.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages telnetd depends on:
ii  adduser              3.112               add and remove users and groups
hi  libc6                2.11.2-6            Embedded GNU C Library: Shared lib
ii  openbsd-inetd [inet- 0.20080125-6        The OpenBSD Internet Superserver
ii  passwd               1:4.1.4.2+svn3283-1 change and administer password and

telnetd recommends no packages.

telnetd suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to