summaryrefslogtreecommitdiff
path: root/Common.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2015-12-15 20:43:44 -0400
committerJoey Hess <joeyh@joeyh.name>2015-12-15 20:43:44 -0400
commitfcd731c545de94b277eb2a85ce20317e37ec9030 (patch)
tree5cfeceebf723bf36169b8889f3bb53ee1c9153f3 /Common.hs
parentb17cedb205501f03d0ad50c278c5d4d57d369a7c (diff)
downloadgit-repair-fcd731c545de94b277eb2a85ce20317e37ec9030.tar.gz
improve temp dir security
http://bugs.debian.org/807341 * Fix insecure temporary permissions. Repair clones the git repository to a temp directory which is made using the user's umask. Thus, it might expose a git repo that is otherwise locked down. * Fix potential denial of service attack when creating temp dirs. Since withTmpDir used easily predictable temporary directory names, an attacker could create foo.0, foo.1, etc and as long as it managed to keep ahead of it, could prevent it from ever returning. I'd rate this as a low utility DOS attack. Most attackers in a position to do this could just fill up the disk /tmp is on to prevent anything from writing temp files. And few parts of git-annex use withTmpDir anyway, so DOS potential is quite low. Examined all callers of withTmpDir and satisfied myself that switching to mkdtmp and so getting a mode 700 temp dir wouldn't break any of them.
Diffstat (limited to 'Common.hs')
0 files changed, 0 insertions, 0 deletions