]> git.99rst.org Git - irssi-scripts.irssi.org.git/commit
Fix disclosure via filesystem
authorJuerd Waalboer <redacted>
Thu, 22 Sep 2016 00:26:09 +0000 (02:26 +0200)
committerAilin Nemui <redacted>
Thu, 22 Sep 2016 02:13:17 +0000 (04:13 +0200)
commitf1b1eb154baa684fad5d65bf4dff79c8ded8b65a
tree9f9c3e6144273c6919e9075a62f9809378c32910
parentd62bb05a34ffd6d8d0f719c551d8e454880ef8e1
Fix disclosure via filesystem

buf.pl restores the scrollbuffer between "/upgrade"s by writing the
contents to a file, and reading that after the new process was spawned.
Through that file, the contents of (private) chat conversations may leak to
other users.

Careful users with a limited umask (e.g. 077) are not affected by this bug.
However, most Linux systems default to a umask of 022, meaning that files
written without further restricting the permissions, are readable by any
user.

This patch sets a safer umask of 077 for the scrollbuffer dump, and will
remove the temporary file after use to further reduce the attack surface.
Additionally, it will remove any remaining temporary scrollbuffer file left
in place, like those written by previous versions of the script.
scripts/buf.pl
git clone https://git.99rst.org/PROJECT