project-machine / puzzlefs

Apache License 2.0
378 stars 18 forks source link

Fix buffer overread in file_read #88

Closed ariel-miculas closed 1 year ago

ariel-miculas commented 1 year ago

Ensure we take the offset into account when reading from a file chunk, otherwise we might end up leaking another file's data, since the last chunk in the list of chunks can contain data from other files. This issue was observed while developing the kernel driver. The userspace implementation might not encounter it due to the way in which fuse handles the read operations.