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

Bug#511620: putty-tools: psftp segfaults trying to open a remote server



On Mon, Jan 12, 2009 at 10:02:41PM +0000, Colin Watson wrote:
On Mon, Jan 12, 2009 at 09:13:15PM +0000, brian m. carlson wrote:
	fp = (FILE *) 0x0

That would happen if popen() fails. The manual page says:

      The  popen()  function  returns  NULL if the fork(2) or pipe(2)
      calls fail, or if it cannot allocate memory.

This could happen if you've run out of memory or hit a resource limit.
Could you please investigate and find out whether one of these things is
true? strace may help.

I determined that the bug is actually in glibc in experimental.  The
errno value is set to ENOSYS.  Last time I checked, Linux 2.6.27 had
working fork(2) and pipe(2) calls, so glibc is doing some pretty
crackful things.

I also found out that this is not occuring with every popen call, but
only some of them.  Whether the bug occurs is specific to an invocation,
but every such invocation is reproducible.

Nevertheless, putty should check the return value of popen.  Crashing
when popen fails is not exactly robust.

--
brian m. carlson / brian with sandals: Houston, Texas, US
+1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only
troff on top of XML: http://crustytoothpaste.ath.cx/~bmc/code/thwack
OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187

Attachment: signature.asc
Description: Digital signature


Reply to: