gefs - good enough file system
https://orib.dev/gefs.html [orib.dev]
2023-04-28 23:50
tags:
fs
plan9
systems
Gefs is a new file system built for Plan 9. It aims to be a crash-safe, corruption-detecting, simple, and fast snapshotting file system, in that order. Gefs achieves these goals by building a traditional 9p file system interface on top of a forest of copy-on-write Bε trees. It doesn’t try to be optimal on all axes, but good enough for daily use.
source: L
Non-POSIX file systems
https://weinholt.se/articles/non-posix-filesystems/ [weinholt.se]
2020-09-09 20:54
tags:
fs
retro
systems
Operating systems and file systems have traditionally been developed hand in hand. They impose mutual constraints on each other. Today we have two major leaders in file system semantics: Windows and POSIX. They are very close to each other when compared to the full set of possibilities. Interesting things happened before POSIX monopolized file system semantics.
source: L
Unix's design issue of device numbers being in stat() results for files
https://utcc.utoronto.ca/~cks/space/blog/unix/FilesystemStatDeviceProblem [utcc.utoronto.ca]
2020-07-01 04:09
tags:
fs
systems
unix
Sometimes, you will hear the view that Unix’s design is without significant issues, especially the ‘pure’ design of Research Unix (before people who didn’t really understand Unix like Berkeley and corporate AT&T got their hands on it). Unfortunately that is not the case, and there are some areas where Research Unix made decisions that still haunt us to this day. For reasons beyond the scope of this entry, today’s example is that part of the file attributes that you get from stat() system call and its friends is the ‘device number’ of the filesystem the file is on.
I think it’s a bit exaggerated to say this is an issue that haunts us. More like a historical note.
Blaming the operating system for allowing people to create files with unusual characters in their names
https://devblogs.microsoft.com/oldnewthing/20200617-00/?p=103870 [devblogs.microsoft.com]
2020-06-18 01:09
tags:
fs
security
sh
windows
What we have here is a case of creating an insecure system and then being surprised that the system is insecure.
This is all too common, but the fix is equally shortsighted. Always too much focus on narrow aspect of the problem.
They claimed that the issue could be fixed by simply adding the ampersand to the list of illegal file name characters. They forgot about the percent sign (for injecting environment variables), the caret (for escaping), and possibly even the apostrophe.
How did MS-DOS decide that two seconds was the amount of time to keep the floppy disk cache valid?
https://devblogs.microsoft.com/oldnewthing/20190924-00/?p=102915 [devblogs.microsoft.com]
2019-09-25 02:12
tags:
fs
hardware
retro
storage
systems
windows
Why file and directory operations are synchronous in NFS
https://utcc.utoronto.ca/~cks/space/blog/unix/NFSSynchronousMetadata [utcc.utoronto.ca]
2019-07-23 04:35
tags:
fs
networking
unix
One simple answer is that the Unix API provides no way to report delayed errors for file and directory operations. If you write() data, it is an accepted part of the Unix API that errors stemming from that write may not be reported until much later, such as when you close() the file. This includes not just ‘IO error’ type errors, but also problems such as ‘out of space’ or ‘disk quota exceeded’; they may only appear and become definite when the system forces the data to be written out. However, there’s no equivalent of close() for things like removing files or renaming them, or making directories; the Unix API assumes that these either succeed or fail on the spot.
Deconstruct files
https://danluu.com/deconstruct-files/ [danluu.com]
2019-07-13 16:55
tags:
best
factcheck
fs
hardware
linux
programming
storage
systems
turtles
unix
Let’s talk about files! Most developers seem to think that files are easy.
In this talk, we’re going to look at how file systems differ from each other and other issues we might encounter when writing to files. We’re going to look at the file “stack”, starting at the top with the file API, moving down to the filesystem, and then moving down to disk.
source: danluu
What is WofCompressedData?
https://devblogs.microsoft.com/oldnewthing/20190618-00/?p=102597 [devblogs.microsoft.com]
2019-06-18 23:12
tags:
compression
fs
storage
systems
windows
The documentation for wofapi.h says merely “This header is used by Data Access and Storage.” For more information, it refers you to another web page that contains no additional information. WOF stands for Windows Overlay Filter, which is a nice name that doesn’t really tell you much about what it does or what it’s for.
Changing the native NTFS file compression would be a disk format breaking change, which is not something taken lightly. Doing it as a filter provides much more flexibility. The downside is that if you mount the volume on a system that doesn’t support the Windows Overlay Filter, all you see is an empty file. Fortunately, WOF is used only for system-installed files, and if you are mounting the volume onto another system, it’s probably for data recovery purposes, so you’re interested in user data, not system files.
A history of S_IFMT
http://www.lubutu.com/soso/a-history-of-sifmt [www.lubutu.com]
2019-05-31 23:01
tags:
c
fs
retro
unix
The question I’m going to answer in this post is not why 4 bits are used, but why they’re used the way they are. If you have a look at the standard file types, their values seem pretty arbitrary, when you might expect a simple count upwards.
source: L
dragonfly - Add initial FUSE support
http://lists.dragonflybsd.org/pipermail/commits/2019-March/718568.html [lists.dragonflybsd.org]
2019-05-03 00:32
tags:
dragonfly
fs
The basic code design comes from FreeBSD, but the code is written from scratch. It was just easier to write from scratch than trying to port sys/fs/fuse/* in FreeBSD for various reasons. Note that this is to implement FUSE API/ABI, but not to be compatible with FreeBSD implementation which contains FreeBSD specific sysctls, etc.
source: Dfly
ufs - Expand time_t support to 48 bits
http://lists.dragonflybsd.org/pipermail/commits/2019-March/718475.html [lists.dragonflybsd.org]
2019-04-24 22:42
tags:
bugfix
dragonfly
format
fs
storage
Fix time overflow issues in the original 32-bit UFS code in two ways. First, treat the original 32-bit seconds fields as unsigned.Second, utilize the spare fields to expand these fields to 48 bits each. Retain the nanosecond-grain accuracy of the nsec fields.
source: Dfly
Introducing funlinkat
https://oshogbo.vexillium.org/blog/63/ [oshogbo.vexillium.org]
2019-04-10 18:13
tags:
freebsd
fs
unix
This syscall would only performs additional sanitary checks if we are removing a directory entry which corresponds to the inode stored which refers to the file descriptor.
source: L
scp client multiple vulnerabilities
https://sintonen.fi/advisories/scp-client-multiple-vulnerabilities.txt [sintonen.fi]
2019-01-15 00:15
tags:
fs
networking
security
swtools
Many scp clients fail to verify if the objects returned by the scp server match those it asked for. This issue dates back to 1983 and rcp, on which scp is based. A separate flaw in the client allows the target directory attributes to be changed arbitrarily. Finally, two vulnerabilities in clients may allow server to spoof the client output.
Be careful what you believe.
source: grugq
The future of ZFS in FreeBSD
https://lists.freebsd.org/pipermail/freebsd-current/2018-December/072422.html [lists.freebsd.org]
2018-12-19 21:18
tags:
freebsd
fs
storage
update
This shift means that there will be little to no net new development of Illumos. While working through the git history of ZoL I have also discovered that many races and locking bugs have been fixed in ZoL and never made it back to Illumos and thus FreeBSD. This state of affairs has led to a general agreement among the stakeholders that I have spoken to that it makes sense to rebase FreeBSD’s ZFS on ZoL.
Also some background: https://lists.freebsd.org/pipermail/freebsd-current/2018-December/072430.html
source: L
How we spent two weeks hunting an NFS bug in the Linux kernel
https://about.gitlab.com/2018/11/14/how-we-spent-two-weeks-hunting-an-nfs-bug/ [about.gitlab.com]
2018-11-29 19:24
tags:
bugfix
fs
investigation
linux
networking
Only two weeks for an NFS bug?
source: L
Fuchsia - Dot Dot Considered Harmful
https://fuchsia.googlesource.com/docs/+/HEAD/the-book/dotdot.md [fuchsia.googlesource.com]
2018-11-29 05:36
tags:
defense
fs
security
unix
If a handle is provided to a directory, it should imply access to resources within that directory (and additionally, their subdirectories). Unfortunately, however, a holdout from POSIX prevents directory handles from cleanly integrating with these concepts in a capability system: “..”. If a handle is provided to a directory, the client can simply request “..”, and the handle will be “upgraded” to access the parent directory, with broader scope. As a consequence, this implies that a handle to a directory can be upgraded arbitrarily to access the entire filesystem.
source: HN
Capsicum
https://oshogbo.vexillium.org/blog/57/ [oshogbo.vexillium.org]
2018-11-18 01:08
tags:
defense
freebsd
fs
security
unix
I spent a couple of years evangelizing about Capsicum. I wrote many articles about it. So, it is very natural that I would also like to update you on this blog about the progress of the Capsicum project in FreeBSD, because this is what I’m doing in my free time. That said I feel that this blog wouldn’t be completed without some introduction to what Capsicum is. This post should fill this gap. Over the next weeks and months we will extend this topic and discuss different parts of Capsicum.
source: Dfly
Windows 10 October 2018 Update no longer deletes your data
https://arstechnica.com/gadgets/2018/10/microsoft-fixes-october-update-file-deleting-bug-resumes-insider-testing/ [arstechnica.com]
2018-10-10 21:03
tags:
bugfix
fs
storage
update
windows
The October 2018 Update tried to tidy up this situation. When KFR is being used, the October 2018 Update will delete the original, default Known Folder locations. Microsoft imagined that this would simply remove some empty, redundant directories from your user profile. No need to have a Documents directory in your profile if you’re using a redirected location, after all. The problem is, it neither checked to see if those directories were empty first, nor copied any files to the new redirected location. It just wiped out the old directory, along with anything stored within it. Hence the data loss.
Maybe just leave tidying to the user.
OATmeal on the Universal Cereal Bus: Exploiting Android phones over USB
https://googleprojectzero.blogspot.com/2018/09/oatmeal-on-universal-cereal-bus.html [googleprojectzero.blogspot.com]
2018-09-16 20:35
tags:
android
exploit
fs
linux
security
Recently, there has been some attention around the topic of physical attacks on smartphones, where an attacker with the ability to connect USB devices to a locked phone attempts to gain access to the data stored on the device. This blogpost describes how such an attack could have been performed against Android devices (tested with a Pixel 2).
Interesting exploit chain and pivot. Lots of little bugs here, there, everywhere.
As an attacker, it normally shouldn’t be possible to mount an ext4 filesystem this way because phones aren’t usually set up with any such keys; and even if there is such a key, you’d still have to know what the correct partition GUID is and what the key is. However, we can mount a vfat filesystem over /data/misc and put our own key there, for our own GUID. Then, while the first malicious USB mass storage device is still connected, we can connect a second one that is mounted as PrivateVolume using the keys vold will read from the first USB mass storage device.
Notably, this attack crosses two weakly-enforced security boundaries: The boundary from blkid_untrusted to vold (when vold uses the UUID provided by blkid_untrusted in a pathname without checking that it resembles a valid UUID) and the boundary from the zygote to the TCB (by abusing the zygote’s CAP_SYS_ADMIN capability). Software vendors have, very rightly, been stressing for quite some time that it is important for security researchers to be aware of what is, and what isn’t, a security boundary - but it is also important for vendors to decide where they want to have security boundaries and then rigorously enforce those boundaries. Unenforced security boundaries can be of limited use - for example, as a development aid while stronger isolation is in development -, but they can also have negative effects by obfuscating how important a component is for the security of the overall system.
Remote Code Execution in Alpine Linux
https://justi.cz/security/2018/09/13/alpine-apk-rce.html [justi.cz]
2018-09-13 20:07
tags:
fs
linux
security
Given a MITM apk repo.
Persistent arbitrary file writes can be easily turned into code execution because of apk’s “commit hooks” feature. If we can figure out a way to extract a file into /etc/apk/commit_hooks.d/ and have it stay there after the cleanup process, it will be executed before apk exits.
Transactions are hard.
source: HN