[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: If $HISTFILE is set to /dev/null and you execute more commands than
From: |
Chet Ramey |
Subject: |
Re: If $HISTFILE is set to /dev/null and you execute more commands than $HISTFILESIZE, /dev/null is deleted. |
Date: |
Wed, 04 Feb 2015 10:26:40 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
On 2/1/15 1:52 AM, Jonathan Hankins wrote:
> ​Right. My concern is that a potential exploit could inject a malicious
> value for HISTFILE into the environment. I think (but may be wrong) that
> HISTFILE is the only codepath in a default shell invocation that could
> result in a silent writing to an arbitrary file without direct action on
> the part of the user.
If I can inject arbitrary variables into the environment, I'm not going to
mess around with HISTFILE. I'm going straight to LD_PRELOAD or maybe
LD_LIBRARY_PATH, game over.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/