File: CVE-2011-1835.patch

package info (click to toggle)
ecryptfs-utils 83-4%2Bsqueeze2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze-lts
  • size: 2,732 kB
  • ctags: 1,402
  • sloc: ansic: 15,975; sh: 11,096; makefile: 250; python: 41
file content (15 lines) | stat: -rw-r--r-- 778 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Description: fix key poisoning via insecure temp directory handling
Author: Marc Deslauriers <marc.deslauriers@canonical.com>
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/ecryptfs-utils/+bug/732628

--- ecryptfs-utils-83.orig/src/utils/ecryptfs-setup-private
+++ ecryptfs-utils-83/src/utils/ecryptfs-setup-private
@@ -380,7 +380,7 @@
 	# ramdisk, to keep it from leaking to the hard-drive.
 	temp=`mktemp /dev/shm/.ecryptfs-XXXXXX`
 	printf "%s" "$MOUNTPASS" > "$temp"
-	mv "$temp" "/dev/shm/.ecryptfs-$USER"
+	mv -f -T "$temp" "/dev/shm/.ecryptfs-$USER" || error "Could not create passphrase file"
 else
 	printf "%s\n%s" "$MOUNTPASS" "$LOGINPASS" | ecryptfs-wrap-passphrase "$HOME/.ecryptfs/wrapped-passphrase" - || error "$(gettext 'Could not wrap passphrase')"
 fi