summaryrefslogtreecommitdiff
path: root/ChangeLog
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2017-05-08 14:57:59 +0200
committerFlorian Weimer <fweimer@redhat.com>2017-05-08 16:20:40 +0200
commitc22553effb151532eb95fc1f7bb17a3aebe63202 (patch)
tree6064f0d1bf34b0ec8aaebd04cd1758c81f4666ce /ChangeLog
parent706256afb6c844a0e6aaab2b60f4326b91aca2e9 (diff)
downloadglibc-c22553effb151532eb95fc1f7bb17a3aebe63202.tar.gz
support: Prevent multiple deletion of temporary files
Otherwise, another user might recreate these files after the first deletion. Particularly with temporary directories, this could result in the removal of unintended files through symbol link attacks.
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog22
1 files changed, 22 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 603587bc80..e47da2a7c0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,27 @@
2017-05-08 Florian Weimer <fweimer@redhat.com>
+ Prevent multiple deletion of temporary files.
+ * support/temp_file.c (struct temp_name_list): Add owner member.
+ (add_temp_file): Record owner.
+ (support_delete_temp_files): Delete file only if owner matches.
+ * posix/tst-exec.c (temp_fd1, temp_fd2): Define.
+ (do_prepare): Use create_temp_file instead of add_temp_file.
+ Initialize temp_fd1, temp_fd2.
+ (do_test): Use global temp_fd1, temp_fd2 variables. Let the test
+ framework remove the temporary files.
+ * posix/tst-exec.c (temp_fd1, temp_fd2, temp_fd3): Define.
+ (do_prepare): Use create_temp_file instead of add_temp_file.
+ Initialize temp_fd1, temp_fd2, temp_fd3.
+ (do_test): Use global temp_fd1, temp_fd2, temp_fd3 variables. Let
+ the test framework remove the temporary files.
+ * posix/tst-vfork3.c (do_prepare): Adjust for LIFO order of file
+ deletion.
+ * posix/tst-pathconf.c (do_test): Do not call rmdir on the
+ temporary directory. It is removed by the test framework.
+ * dirent/tst-scandir.c (do_test): Likewise.
+
+2017-05-08 Florian Weimer <fweimer@redhat.com>
+
Delete temporary files in LIFO order.
* support/temp_file.c (struct temp_name_list): Replace q member
with next.