Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 15673 - insecure file in /tmp: root's environment is world readable
Summary: insecure file in /tmp: root's environment is world readable
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Nicholas Jones (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-14 01:04 UTC by Rajiv Aaron Manglani (RETIRED)
Modified: 2003-02-25 02:15 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rajiv Aaron Manglani (RETIRED) gentoo-dev 2003-02-14 01:04:41 UTC
i emerged m4-1.4p-r1. after the emerge finished, cat /tmp/env as any user. this
file is the output of 'env' as run by root. this file was created world-readable.

although i'm on ppc, a user on x86 had the same issue.

this file really should not be created. if it has to be there, it should not be
world readable and it should be removed after the ebuild is finished.

(why is it being created?)
Comment 1 Nicholas Jones (RETIRED) gentoo-dev 2003-02-16 22:11:34 UTC
I have no idea. I had that file too. Not sure from when though.

Can you reproduce this? I cannot find a source for it.
Comment 2 Nicholas Jones (RETIRED) gentoo-dev 2003-02-22 08:24:30 UTC
Verify and reopen.
Comment 3 Rajiv Aaron Manglani (RETIRED) gentoo-dev 2003-02-23 01:38:26 UTC
tried it again. same thing. i did 'watch -n 1 ls -l /tmp' and then 'emerge unmerge m4; emerge m4' sure enough the file appeared, just as the configure finished and the make started.

this is with sys-devel/m4-1.4p-r1.
Comment 4 Graham Forest 2003-02-23 05:36:05 UTC
I have the same file (from the m4 build, as the variables inside it note)... Very odd
Comment 5 Graham Forest 2003-02-24 03:14:52 UTC
tests/mkconfig.sh in the m4 source dir is a rather interesting file:

#!/bin/sh
env >/tmp/env
sed -n -e '/^#define \(\(WITH\|ENABLE\)_.*\) \(.*\)$/s//define(\1, \3)dnl/p' config.h > tests/config.m4
sed -n -e '/^#define \(\(WITH\|ENABLE\)_.*\) \(.*\)$/s//\1=\3/p' config.h > tests/config.sh
Comment 6 Rajiv Aaron Manglani (RETIRED) gentoo-dev 2003-02-24 03:38:05 UTC
notified upstream ...

------- Forwarded Message

Date: Mon, 24 Feb 2003 03:37:02 -0500
To: bug-m4@gnu.org
From: Rajiv Aaron Manglani <rajiv@gentoo.org>
Subject: insecure file in /tmp after m4 build


hello there. while building m4 on gentoo, we discovered that one of the configure tests (tests/mkconfig.sh) creates /tmp/env, which is a dump of the environment of the user doing the build.

was this used for testing and left in by accident?

see http://bugs.gentoo.org/show_bug.cgi?id=15673 for more info.

please let me know the purpose of this file.

thanks

------- End of Forwarded Message
Comment 7 Nicholas Jones (RETIRED) gentoo-dev 2003-02-24 05:25:51 UTC
Ok. Fixed in the ebuilds.
Comment 8 Nicholas Jones (RETIRED) gentoo-dev 2003-02-25 02:15:15 UTC
I think it's dealt with.