Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 May 2012 19:11:14 GMT
From:      Darren Reed <darrenr@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/168389: rcmd(3) recursion when RSH points to rsh
Message-ID:  <201205271911.q4RJBEcw024437@freefall.freebsd.org>
Resent-Message-ID: <201205271920.q4RJK1QS035639@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         168389
>Category:       bin
>Synopsis:       rcmd(3) recursion when RSH points to rsh
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 27 19:20:01 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Darren Reed
>Release:        FreeBSD 9.0-STABLE i386
>Organization:
FreeBSD
>Environment:
System: FreeBSD freefall.freebsd.org 9.0-STABLE FreeBSD 9.0-STABLE #6 r235139: T
ue May 8 21:19:03 UTC 2012 simon@freefall.freebsd.org:/usr/obj/usr/src/sys/FREEF
ALL i386


>Description:
In rcmd(3) the environment variable RSH is used to indicate which
program to execute in lieu of rsh itself. The code path present
in rcmd(3) and rcmdsh() will result in continual execution of
rsh if RSH is set to rsh itself. In fact, the RSH environment
variable can only be safely set to a program that does not use
rcmd(3).

What possibly needs to happen here is for rcmd(3) to clear the
RSH environment variable or otherwise make some effort to ensure
that the program it is about to execute is not the same as the
one that is currently executing.
>How-To-Repeat:
export RSH=rsh
rsh localhost who

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205271911.q4RJBEcw024437>