Bug 159003 - CAN-2005-1751 shtool insecure temporary file creation
CAN-2005-1751 shtool insecure temporary file creation
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: ncpfs (Show other bugs)
3
All Linux
medium Severity low
: ---
: ---
Assigned To: Jiri Ryska
David Lawrence
impact=low,public=20050524,source=ven...
: Security
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-05-27 11:41 EDT by Josh Bressers
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-06-01 08:39:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Josh Bressers 2005-05-27 11:41:34 EDT
Race condition in shtool 2.0.1 and earlier allows local users to
create or modify arbitrary files via a symlink attack on the
.shtool.$$ temporary file.
http://www.zataz.net/adviso/shtool-05252005.txt

ncpfs contains shtool in its source.
Comment 1 Josh Bressers 2005-05-27 11:41:59 EDT
This issue should also affect FC4
Comment 2 Jiri Ryska 2005-06-01 08:39:48 EDT
Ncpfs contains shtool in its source but it is not original shtool. It is only
small part of it. The part of code which create temporary file is in if sequence
and its condition can never be true. 
Code:
...
gen_tmpfile=no
...
if [ ".$gen_tmpfile" = .yes ]; then
    ...
    tmpfile="$tmpdir/.shtool.$$"
    rm -f $tmpfile >/dev/null 2>&1
    touch $tmpfile
fi

Note You need to log in before you can comment on or make changes to this bug.