summaryrefslogtreecommitdiff
path: root/bin/sqfsdiff
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-05-03 01:43:11 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-05-03 01:43:11 +0200
commit4f08666b8aafe66d4786158c8f26dec1c540893b (patch)
treeed76d353aed4601d7075dab978c8d0e4c5ecf350 /bin/sqfsdiff
parent0ef91d8ffc4d9eecf5733b4dd173ccebad6c00d6 (diff)
Fix: use 0644 as default permissions when creating files
Until now, when packing or unpacking a SquashFS image, files where created with paranoid permissions (i.e. 0600). The rational behind this was that otherwise, the tools may inadvertently expose secrets, e.g. if a root user packs files that that aren't world readable, such as the /etc/shadows file, but the packed SquashFS image is, we have accidentally leaked this file to other users that can access the newly created SquashFS image. The same line of reasoning also applies when unpacking files. Unfortunately, this breaks a list of other, more common standard use cases (e.g. a build server where the an image is built by a deamon running as user X but then has to be accessed by another deamon running as Y). This commit changes to a more standard approach of using permissive file permissions by default and asking paranoid users to simply use a paranoid umask. For tar2sqfs & gensquashfs this simply means chaning the default permissions in the libsquashfs file implementation. For rdsquashfs on the other hand there is still the use case where the unpacked files get the permissions from the [secret] image, so setting a strict umask is not applicable and changing to permissive file mode leaks something. For this case a second code path needs to be added that derives the permissions from the ones in the image. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'bin/sqfsdiff')
0 files changed, 0 insertions, 0 deletions