NetBSD Problem Report #51973

From www@NetBSD.org  Thu Feb 16 16:44:32 2017
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 996627A1F5
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 16 Feb 2017 16:44:32 +0000 (UTC)
Message-Id: <20170216164431.6B13D7A215@mollari.NetBSD.org>
Date: Thu, 16 Feb 2017 16:44:31 +0000 (UTC)
From: roy@marples.name
Reply-To: roy@marples.name
To: gnats-bugs@NetBSD.org
Subject: openssh processes content of AuthorizedKeysCommand file instead of it's output
X-Send-Pr-Version: www-1.0

>Number:         51973
>Category:       security
>Synopsis:       openssh processes content of AuthorizedKeysCommand file instead of it's output
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    security-officer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 16 16:45:01 +0000 2017
>Closed-Date:    Fri Mar 31 08:37:36 +0000 2023
>Last-Modified:  Fri Mar 31 08:37:36 +0000 2023
>Originator:     Roy Marples
>Release:        -current
>Organization:
>Environment:
NetBSD xenity.marples.name 7.99.52 NetBSD 7.99.52 (XEN3_DOMU.201612272230Z) amd64
>Description:
Here is some debug output from sshd
debug3: subprocess: AuthorizedKeysCommand command "/usr/local/libexec/phabricator-ssh-hook.sh vcs-user" running as vcs-user
debug1: temporarily_use_uid: 508/508 (e=0/0)
debug1: restore_uid: 0/0
debug3: subprocess: AuthorizedKeysCommand pid 14045
debug1: temporarily_use_uid: 508/508 (e=0/0)
debug1: trying public key file /usr/local/libexec/phabricator-ssh-hook.sh
debug1: fd 7 clearing O_NONBLOCK
debug2: user_key_allowed: check options: 'VCSUSER="vcs-user"
'
debug2: user_key_allowed: advance: ''
debug2: user_key_allowed: check options: 'ROOT="/usr/pkg/share/phabricator"
'
debug2: user_key_allowed: advance: ''
debug2: user_key_allowed: check options: '[ "$1" = "$VCSUSER" ] || exit 1
'
debug2: user_key_allowed: advance: '"$1" = "$VCSUSER" ] || exit 1
'
debug2: user_key_allowed: check options: 'exec "$ROOT/bin/ssh-auth" $@
'
debug2: user_key_allowed: advance: '"$ROOT/bin/ssh-auth" $@
'
debug2: key not found
debug1: restore_uid: 0/0


Using openssh from pkgsrc fixes the problem
>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51973 CVS commit: src/crypto/external/bsd/openssh/dist
Date: Thu, 16 Feb 2017 12:56:07 -0500

 Module Name:	src
 Committed By:	christos
 Date:		Thu Feb 16 17:56:07 UTC 2017

 Modified Files:
 	src/crypto/external/bsd/openssh/dist: auth2-pubkey.c

 Log Message:
 PR/51973: Use proper fd for AuthorizedKeysCommand


 To generate a diff of this commit:
 cvs rdiff -u -r1.15 -r1.16 \
     src/crypto/external/bsd/openssh/dist/auth2-pubkey.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Roy Marples <roy@marples.name>
To: gnats-bugs@NetBSD.org, security-officer@netbsd.org,
 gnats-admin@netbsd.org, security-alert@netbsd.org
Cc: 
Subject: Re: PR/51973 CVS commit: src/crypto/external/bsd/openssh/dist
Date: Fri, 17 Feb 2017 11:11:57 +0000

 On 16/02/17 18:00, Christos Zoulas wrote:
 >  Module Name:	src
 >  Committed By:	christos
 >  Date:		Thu Feb 16 17:56:07 UTC 2017
 >  
 >  Modified Files:
 >  	src/crypto/external/bsd/openssh/dist: auth2-pubkey.c
 >  
 >  Log Message:
 >  PR/51973: Use proper fd for AuthorizedKeysCommand
 >  
 >  To generate a diff of this commit:
 >  cvs rdiff -u -r1.15 -r1.16 \
 >      src/crypto/external/bsd/openssh/dist/auth2-pubkey.c

 Confirmed fix, thanks.

 Roy

State-Changed-From-To: open->needs-pullups
State-Changed-By: maxv@NetBSD.org
State-Changed-When: Sun, 25 Feb 2018 18:56:23 +0000
State-Changed-Why:


State-Changed-From-To: needs-pullups->closed
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Fri, 31 Mar 2023 08:37:36 +0000
State-Changed-Why:
netbsd-7 is EOL, no more pullups needed


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.