bug-gzip
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#15672: Sequence of chmod and chown - patch


From: Paul Eggert
Subject: bug#15672: Sequence of chmod and chown - patch
Date: Mon, 21 Oct 2013 11:18:09 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0

Doesn't this patch introduce a security hole into the
Solaris port of gzip?

If gzip chmods the output file before chowning it,
the output file may be (say) group-readable to the
current user's group, even though the intent is
that the file be group-readable only to the intended
user's group.  This will allow someone to read the file
who shouldn't be able to read the file, if they open
the file between the chmod and the chown.

Instead, how about the following idea.  On Solaris, if
a process discovers that it has the right to chown
but it cannot chmod other people's files, then it
relinquishes the right to chown.  That way, the chown
will fail (just as it does on GNU systems) and gzip
will behave on Solaris as it does elsewhere, and this
security hole will be closed.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]