fix race condition allowing attackers to access destination file
Origin: upstream
Bug: https://github.com/facebook/zstd/issues/2491
Bug-Debian: https://github.com/facebook/zstd/issues/2491
Applied-Upstream: commit:
a774c5797399040af62db21d8a9b9769e005430e
Reviewed-by: Étienne Mollier <etienne.mollier@mailoo.org>
Last-Update: 2021-02-18
This commit addresses https://github.com/facebook/zstd/issues/2491.
Note that a downside of this solution is that it is global: `umask()` affects
all file creation calls in the process. I believe this is safe since
`fileio.c` functions should only ever be used in the zstd binary, and these
are (almost) the only files ever created by zstd, and AIUI they're only
created in a single thread. So we can get away with messing with global state.
Note that this doesn't change the permissions of files created by `dibio.c`.
I'm not sure what those should be...
Last-Update: 2021-02-18
Gbp-Pq: Name 0018-fix-file-permissions-on-compression.patch
Make the build reproducible
Last-Update: 2018-05-04
Applied-Upstream: https://github.com/facebook/zstd/commit/
ef1abd3c071ce42a457404ee2bca6d5bebb87f62
Gbp-Pq: Name 0014-Reproducible-build.patch
Do not build zlibWrapper examples against embedded code copies.
Gbp-Pq: Name 0008-Address-embedded-zlib.patch