From fenner@fenestro.attlabs.att.com  Thu Nov 30 22:22:51 2000
Return-Path: <fenner@fenestro.attlabs.att.com>
Received: from fenestro.attlabs.att.com (solarium.digisle.com [167.216.154.173])
	by hub.freebsd.org (Postfix) with ESMTP id 3E77837B400
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 30 Nov 2000 22:22:51 -0800 (PST)
Received: (from fenner@localhost)
	by fenestro.attlabs.att.com (8.11.0/8.11.0) id eB16MmO99953;
	Thu, 30 Nov 2000 22:22:48 -0800 (PST)
	(envelope-from fenner)
Message-Id: <200012010622.eB16MmO99953@fenestro.attlabs.att.com>
Date: Thu, 30 Nov 2000 22:22:48 -0800 (PST)
From: Bill Fenner <fenner@research.att.com>
Sender: fenner@fenestro.attlabs.att.com
Reply-To: fenner@research.att.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: opie doesn't know that ssh connections are secure and you can't tell it
X-Send-Pr-Version: 3.2

>Number:         23203
>Category:       bin
>Synopsis:       opie doesn't know that ssh connections are secure and you can't tell it
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 30 22:30:02 PST 2000
>Closed-Date:    Tue Aug 13 04:57:52 PDT 2002
>Last-Modified:  Tue Aug 13 04:57:52 PDT 2002
>Originator:     Bill Fenner
>Release:        FreeBSD 4.2-BETA i386
>Organization:
AT&T Labs - Research
>Environment:

	
opie
openssh
(parts of base system)

>Description:

	
The opie commands opiekey (otp-md4 otp-md5) and opiepasswd refuse
to accept a secret pass phrase if they think they're not being run
from a secure terminal.  There is a command-line option to override
this check, but it is not compiled in by default on FreeBSD.  This
is one of these stupid well-intentioned things that just ends up
getting in the way.  A desperate user will avoid this whole situation
by being even less secure by using e.g.
"echo mypassphrase | env DISPLAY=:0 otp-md5 ..."


>How-To-Repeat:

	
ssh freefall.freebsd.org
otp-md5 1 nanny

>Fix:

	
Stupid, less secure workaround:
echo "mypassphrase" | env DISPLAY=:0 otp-md5 seq seed

Fix: enable the -f flag for opiekey and opiepasswd by adding the
proper defines to the Makefiles for opiekey and opiepasswd, and
fixing the buggy opiekey.

Index: Makefile
===================================================================
RCS file: /home/ncvs/src/usr.bin/opiekey/Makefile,v
retrieving revision 1.4.2.1
diff -u -r1.4.2.1 Makefile
--- Makefile	2000/05/14 21:15:05	1.4.2.1
+++ Makefile	2000/12/01 05:51:26
@@ -6,7 +6,7 @@
 SRCS=	opiekey.c
 MAN1=	opiekey.1
 
-CFLAGS+= -I${OPIE_DIST}
+CFLAGS+= -I${OPIE_DIST} -DINSECURE_OVERRIDE
 
 DPADD=	${LIBOPIE} ${LIBMD}
 LDADD=	-lopie -lmd
Index: Makefile
===================================================================
RCS file: /home/ncvs/src/usr.bin/opiepasswd/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- Makefile	1999/08/28 01:04:47	1.4
+++ Makefile	2000/12/01 05:51:40
@@ -6,7 +6,7 @@
 SRCS=	opiepasswd.c
 MAN1=   opiepasswd.1
 
-CFLAGS+=-I${OPIE_DIST}
+CFLAGS+=-I${OPIE_DIST} -DINSECURE_OVERRIDE
 
 DPADD=	${LIBOPIE} ${LIBMD}
 LDADD=	-lopie -lmd
Index: opiekey.c
===================================================================
RCS file: /home/ncvs/src/contrib/opie/opiekey.c,v
retrieving revision 1.1.1.2.6.1
diff -u -r1.1.1.2.6.1 opiekey.c
--- opiekey.c	2000/06/09 07:14:56	1.1.1.2.6.1
+++ opiekey.c	2000/12/01 05:53:59
@@ -138,7 +138,7 @@
   char *slash;
   int hex = 0;
   int type = RESPONSE_STANDARD;
-  int force;
+  int force = 0;
 
   if (slash = strchr(argv[0], '/'))
     slash++;

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed 
State-Changed-By: ache 
State-Changed-When: Mon Aug 13 12:44:37 PDT 2001 
State-Changed-Why:  
All fixed in -current 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=23203 
State-Changed-From-To: analyzed->closed 
State-Changed-By: ashp 
State-Changed-When: Wed Jan 16 14:41:18 PST 2002 
State-Changed-Why:  
If it's 'all fixed in -current', then it should be closed! :) 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=23203 
State-Changed-From-To: closed->open 
State-Changed-By: ashp 
State-Changed-When: Wed Jan 16 15:13:32 PST 2002 
State-Changed-Why:  
Eek, misclosed.  Problem only fixed in CURRENT, not in STABLE.  Apologies. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=23203 
State-Changed-From-To: open->analyzed 
State-Changed-By: ashp 
State-Changed-When: Wed Jan 16 15:57:04 PST 2002 
State-Changed-Why:  
Oh the pain.  Thanks Andrey. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=23203 
State-Changed-From-To: analyzed->patched 
State-Changed-By: ache 
State-Changed-When: Sat Jun 8 13:12:17 PDT 2002 
State-Changed-Why:  
This PR state must be "patched" according to guideline 

http://www.freebsd.org/cgi/query-pr.cgi?pr=23203 
State-Changed-From-To: patched->closed 
State-Changed-By: jon 
State-Changed-When: Tue Aug 13 04:57:33 PDT 2002 
State-Changed-Why:  
changed in MFC ~4 weeks ago 

http://www.freebsd.org/cgi/query-pr.cgi?pr=23203 
>Unformatted:
