UsePrivilegeSeparation doesn t work on Linux 2.2.x [Re: OpenSSH 3.2.2 released]

Denis Ducamp Denis.Ducamp at hsc.fr
Sat May 18 01:25:40 EST 2002


On Fri, May 17, 2002 at 10:16:55AM -0400, Niels Provos wrote:
> On Fri, May 17, 2002 at 03:43:30PM +0200, Denis Ducamp wrote:
> > fcntl(4, F_SETFL, O_RDONLY|O_NONBLOCK)  = 0
> > socketpair(PF_UNIX, SOCK_STREAM, 0, [3, 7]) = 0
> > fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
> > fcntl(7, F_SETFD, FD_CLOEXEC)           = 0
> > mmap2(NULL, 65536, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = -1 ENOSYS (Function not implemented)
> > old_mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = -1 EINVAL (Invalid argument)
> > write(2, "mmap(65536)\r\n", 13mmap(65536)
> > )         = 13
> > write(2, "debug1: Calling cleanup 0x806ae9"..., 40debug1: Calling cleanup 0x806ae9c(0x0)
> > ) = 40
> > shutdown(4, 2 /* send and receive */)   = 0
> That looks more like a kernel problem to me.  It does not know about
> the mmap2 system call.  That is sort of pretty weird.  Did you you
> pre-compiled binaries or did you compile it yourself?  And then
> it seems that the fallback old_mmap does not like one of the
> parameters.  You need to see what API changed in Linux to make this
> break.

Yep, it  works on linux 2.4 (where I tested several snapshots) but not on
linux 2.2 (where I tested no snapshot). The trace above is with the newest
glibc used (2.2.5), on an older glibc I have :
socketpair(PF_UNIX, SOCK_STREAM, 0, [3, 7]) = 0
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fcntl(7, F_SETFD, FD_CLOEXEC)           = 0
old_mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = -1 EINVAL (Invalid argument)

On Linux 2.4 I have :
socketpair(PF_UNIX, SOCK_STREAM, 0, [3, 7]) = 0
shmat(3, 0x810d0f0, 0x2ptrace: umoven: Input/output error
)                = ?
shmat(7, 0x810d0f0, 0x2ptrace: umoven: Input/output error
)                = ?
mmap2(NULL, 65536, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0x40182000
mmap2(NULL, 1310720, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0x40192000
fork()                                  = 24666

I don't see anything different between mmap(2) on my Linux 2.2 system and my
Linux 2.4 that could have a link with the parameters used by the
old_mmap/mmap2 system calls. I let someone with more knowledge on Linux
kernel compare both versions.

Hope this will help...

Denis Ducamp.

-- 
 Denis.Ducamp at hsc.fr --- Hervé Schauer Consultants --- http://www.hsc.fr/
 Owl/Openwall/snort/hping/dsniff en français   http://www.groar.org/trad/
            Owl en français    http://www.openwall.com/Owl/fr/
 Du bon usage de ... http://usenet-fr.news.eu.org/fr-chartes/rfc1855.html



More information about the openssh-unix-dev mailing list