freebsd-dev/lib/libufs
Kirk McKusick 8f829a5cf0 Continuing efforts to provide hardening of FFS. This change adds a
check hash to the filesystem inodes. Access attempts to files
associated with an inode with an invalid check hash will fail with
EINVAL (Invalid argument). Access is reestablished after an fsck
is run to find and validate the inodes with invalid check-hashes.
This check avoids a class of filesystem panics related to corrupted
inodes. The hash is done using crc32c.

Note this check-hash is for the inode itself and not any of its
indirect blocks. Check-hash validation may be extended to also
cover indirect block pointers, but that will be a separate (and
more costly) feature.

Check hashes are added only to UFS2 and not to UFS1 as UFS1 is
primarily used in embedded systems with small memories and low-powered
processors which need as light-weight a filesystem as possible.

Reviewed by:  kib
Tested by:    Peter Holm
Sponsored by: Netflix
2018-12-11 22:14:37 +00:00
..
block.c lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
bread.3
cgread.3 Fix punctuation. 2018-02-02 00:01:50 +00:00
cgroup.c Correct fsck journal-recovery code to update a cylinder-group 2018-01-17 17:58:24 +00:00
getinode.3 In preparation for adding inode check-hashes, clean up and 2018-11-13 21:40:56 +00:00
inode.c Continuing efforts to provide hardening of FFS. This change adds a 2018-12-11 22:14:37 +00:00
libufs.3 Bring up to date with recently added functions berase(3), getinode(3), 2018-11-26 23:09:45 +00:00
libufs.h Continuing efforts to provide hardening of FFS. This change adds a 2018-12-11 22:14:37 +00:00
Makefile In preparation for adding inode check-hashes, clean up and 2018-11-13 21:40:56 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
sblock.c Normally when an attempt is made to mount a UFS/FFS filesystem whose 2018-12-06 00:09:39 +00:00
sbread.3 Refactoring of reading and writing of the UFS/FFS superblock. 2018-01-26 00:58:32 +00:00
type.c The ufs_disk_write() function is used to upgrade a read-only descriptor 2018-04-08 06:59:42 +00:00
ufs_disk_close.3 Don't put multiple names on a single .Nm line. This fixes apropos(1) 2018-04-17 09:05:46 +00:00