| 76a29519 | 06-Sep-2016 |
Stefan Brüns <stefan.bruens@rwth-aachen.de> |
ext4: fix possible crash on directory traversal, ignore deleted entries
The following command triggers a segfault in search_dir: ./sandbox/u-boot -c 'host bind 0 ./sandbox/test/fs/3GB.ext4.img ;
ext4: fix possible crash on directory traversal, ignore deleted entries
The following command triggers a segfault in search_dir: ./sandbox/u-boot -c 'host bind 0 ./sandbox/test/fs/3GB.ext4.img ; ext4write host 0 0 /./foo 0x10'
The following command triggers a segfault in check_filename: ./sandbox/u-boot -c 'host bind 0 ./sandbox/test/fs/3GB.ext4.img ; ext4write host 0 0 /. 0x10'
"." is the first entry in the directory, thus previous_dir is NULL. The whole previous_dir block in search_dir seems to be a bad copy from check_filename(...). As the changed data is not written to disk, the statement is mostly harmless, save the possible NULL-ptr reference.
Typically a file is unlinked by extending the direntlen of the previous entry. If the entry is the first entry in the directory block, it is invalidated by setting inode=0.
The inode==0 case is hard to trigger without crafted filesystems. It only hits if the first entry in a directory block is deleted and later a lookup for the entry (by name) is done.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
show more ...
|
| 58a9ecba | 01-Sep-2016 |
Michael Walle <michael@walle.cc> |
ext4: fix endianess problems in ext4 write support
All fields were accessed directly instead of using the proper byte swap functions. Thus, ext4 write support was only usable on little-endian archit
ext4: fix endianess problems in ext4 write support
All fields were accessed directly instead of using the proper byte swap functions. Thus, ext4 write support was only usable on little-endian architectures. Fix this.
Signed-off-by: Michael Walle <michael@walle.cc>
show more ...
|
| ae1755be | 11-Sep-2016 |
Stefan Brüns <stefan.bruens@rwth-aachen.de> |
fs/fat: Correct description of determine_fatent function
Current description does not match the function behaviour.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Lukasz Majew
fs/fat: Correct description of determine_fatent function
Current description does not match the function behaviour.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Lukasz Majewski <l.majewski@samsung.com>
show more ...
|
| 3c0ed9c3 | 11-Sep-2016 |
Stefan Brüns <stefan.bruens@rwth-aachen.de> |
fs/fat: Do not write unmodified fat entries to disk
The code caches 6 sectors of the FAT. On FAT traversal, the old contents needs to be flushed to disk, but only if any FAT entries had been modifie
fs/fat: Do not write unmodified fat entries to disk
The code caches 6 sectors of the FAT. On FAT traversal, the old contents needs to be flushed to disk, but only if any FAT entries had been modified. Explicitly flag the buffer on modification.
Currently, creating a new file traverses the whole FAT up to the first free cluster and rewrites the on-disk blocks.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
show more ...
|