From owner-freebsd-current@FreeBSD.ORG Sun Jul 15 15:43:47 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F207716A400 for ; Sun, 15 Jul 2007 15:43:47 +0000 (UTC) (envelope-from michiel@boland.org) Received: from neerbosch.nijmegen.internl.net (neerbosch.nijmegen.internl.net [217.149.193.38]) by mx1.freebsd.org (Postfix) with ESMTP id 8DF4B13C467 for ; Sun, 15 Jul 2007 15:43:47 +0000 (UTC) (envelope-from michiel@boland.org) Received: from neerbosch.nijmegen.internl.net by neerbosch.nijmegen.internl.net via neerbosch.nijmegen.internl.net [217.149.193.38] with ESMTP for id l6FFhjqC007431 (8.13.4/1.4); Sun, 15 Jul 2007 17:43:45 +0200 (MEST) Received: from localhost by neerbosch.nijmegen.internl.net via mboland@localhost with ESMTP for id l6FFhjcu007427 (8.13.4/2.02); Sun, 15 Jul 2007 17:43:45 +0200 (MEST) X-Authentication-Warning: neerbosch.nijmegen.internl.net: mboland owned process doing -bs Date: Sun, 15 Jul 2007 17:43:45 +0200 (MEST) From: Michiel Boland To: freebsd-current@freebsd.org In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: Re: sshd broken with UsePrivilegeSeparation=yes on sparc64 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2007 15:43:48 -0000 It looks like gcc mis-compiles /usr/src/crypto/openssh/monitor_fdpass.c on sparc64. For some reason it optimizes away the assignment of fd on line 132: fd = (*(int *)CMSG_DATA(cmsg)); So I guess that every call to mm_receive_fd will return an undefined value. If I add -O0 to CFLAGS in /usr/src/secure/lib/libssh/Makefile, ssh with UsePrivilegeSeparation=yes works again. So, obviously a gcc bug. I will try to generate a smaller test-case for this.