Debian Bug report logs -
#781367
bash may set a PATH including "." under certain circumstances
Reply or subscribe to this bug.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, team@security.debian.org, secure-testing-team@lists.alioth.debian.org, Matthias Klose <doko@debian.org>:
Bug#781367; Package bash.
(Sat, 28 Mar 2015 07:00:07 GMT) (full text, mbox, link).
Acknowledgement sent
to Christoph Anton Mitterer <calestyo@scientia.net>:
New Bug report received and forwarded. Copy sent to team@security.debian.org, secure-testing-team@lists.alioth.debian.org, Matthias Klose <doko@debian.org>.
(Sat, 28 Mar 2015 07:00:07 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: bash
Version: 4.3-12
Severity: important
Tags: security
Hi.
I've raised the severity a bit, since this may have security
implications.
When bash is started as a login or non-login shell from an environment
that doesn't a reasonable PATH already set and when either --noprofile
respectively --norc are used (or some other forms like run as "sh" or in
posxi mode, I guess) or when the profile/bashrc files don't set a PATH
(which they in principle shouldn't need to) then bash apparently sets
some hardcoded default for root and non-root users.
In both cases this contains "." as PATH directory, which is generally
undesired and typically not recommended to be set per default for
security reasons.
E.g.
$ id -u
1000
$ unset PATH
$ /bin/bash --norc
$ echo $PATH
/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.
or
$ unset PATH
$ /bin/bash --noprofile --login
$ echo $PATH
/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.
and so on.
It seems that this is a Debian speciallity, at least on e.g. centos a
sane path is then set.
Cheers,
Chris.
Marked as found in versions bash/5.1-3.
Request was from Salvatore Bonaccorso <carnil@debian.org>
to 991959-submit@bugs.debian.org.
(Fri, 06 Aug 2021 19:03:03 GMT) (full text, mbox, link).
Merged 781367 991959
Request was from Salvatore Bonaccorso <carnil@debian.org>
to 991959-submit@bugs.debian.org.
(Fri, 06 Aug 2021 19:03:04 GMT) (full text, mbox, link).
Marked as found in versions bash/5.2.21-2.
Request was from Gioele Barabucci <gioele@svario.it>
to control@bugs.debian.org.
(Sun, 24 Mar 2024 00:21:03 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#781367; Package bash.
(Tue, 14 May 2024 09:12:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Chris Hofstaedtler <zeha@debian.org>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>.
(Tue, 14 May 2024 09:12:03 GMT) (full text, mbox, link).
Message #16 received at 781367@bugs.debian.org (full text, mbox, reply):
Control: tags -1 + upstream
On Sat, Mar 28, 2015 at 07:56:01AM +0100, Christoph Anton Mitterer wrote:
[..]
> $ unset PATH
> $ /bin/bash --norc
> $ echo $PATH
> /usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.
[..]
> It seems that this is a Debian speciallity, at least on e.g. centos a
> sane path is then set.
This is upstream's default, see also:
https://git.savannah.gnu.org/cgit/bash.git/tree/config-top.h#n63
(config-top.h define DEFAULT_PATH_VALUE)
Fedora overrides DEFAULT_PATH_VALUE like this:
-DDEFAULT_PATH_VALUE='\"/usr/local/bin:/usr/bin\"'
Chris
Added tag(s) upstream.
Request was from Chris Hofstaedtler <zeha@debian.org>
to 781367-submit@bugs.debian.org.
(Tue, 14 May 2024 09:12:03 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Thu Aug 8 03:47:09 2024;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.