ports/137985: security/openssh-portable: [PATCH] sftp crashes on directory listing
Jonathan Chen
jon at FreeBSD.org
Thu Aug 20 04:10:04 UTC 2009
>Number: 137985
>Category: ports
>Synopsis: security/openssh-portable: [PATCH] sftp crashes on directory listing
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Aug 20 04:10:03 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Jonathan Chen
>Release: 8.0-BETA2 amd64
>Organization:
>Environment:
FreeBSD builder 8.0-BETA2 FreeBSD 8.0-BETA2 #0: Fri Aug 14 19:03:00 EDT 2009 jon at builder:/usr/obj/usr/src/sys/DFLT amd64
>Description:
On FreeBSD, openbsd-compat's glob is supposed to be used used instead of the system glob, due to BROKEN_GLOB being set in configure. However, includes.h pulls in the system glob.h nonetheless, resulting in divergent glob_t definitions within openssh.
This manifests as sftp throwing a SIGBUS when a directory listing is requested.
NB: contrary to the claim in the Makefile, openssh-portable seems to compile just fine on OSVERSION==800104 (once you remove the BROKEN= line)
>How-To-Repeat:
cd /usr/ports/security/openssh-portable
make
work/openssh-5.2p1/sftp localhost
[login]
ls
*SIGBUS*
>Fix:
drop the following patch into files/patch-blah
--- includes.h~ 2009-08-19 23:32:26.000000000 -0400
+++ includes.h 2009-08-19 23:32:53.000000000 -0400
@@ -31,7 +31,8 @@
#endif
#if defined(HAVE_GLOB_H) && defined(GLOB_HAS_ALTDIRFUNC) && \
defined(GLOB_HAS_GL_MATCHC) && \
- defined(HAVE_DECL_GLOB_NOMATCH) && HAVE_DECL_GLOB_NOMATCH != 0
+ defined(HAVE_DECL_GLOB_NOMATCH) && HAVE_DECL_GLOB_NOMATCH != 0 &&\
+ !defined(BROKEN_GLOB)
# include <glob.h>
#endif
#ifdef HAVE_ENDIAN_H
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list