freebsd-dev/sys
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
..
amd64 amd64: stop re-reading curpc on subyte/suword 2018-12-08 04:53:08 +00:00
arm Implement atomic_swap_xxx() for all platforms. 2018-12-10 13:38:13 +00:00
arm64 Only read the ACPI proximity tabled on arm64 when we are booting from 2018-12-11 11:13:11 +00:00
bsm
cam Send a START UNIT command when a disk responds with an ASC of 04/1C. 2018-12-09 21:37:34 +00:00
cddl Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
compat Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
conf Merge ^/head r340918 through r341763. 2018-12-09 11:39:45 +00:00
contrib Remove an ugly Ultrix hack. Ultrix has been AWOL since the last ice 2018-12-06 20:15:54 +00:00
crypto rijndael (AES): Avoid leaking sensitive data on kernel stack 2018-10-26 20:53:01 +00:00
ddb ddb: Enable 'thread <address>' 2018-10-20 20:45:49 +00:00
dev Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
dts arm64: allwinner: Add 792Mhz frequency to sun50i-a64-opp 2018-11-30 10:31:30 +00:00
fs Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
gdb
geom gmirror: Evaluate mirror components against newest metadata copy 2018-12-07 02:44:04 +00:00
gnu Update our devicetree to 4.19 for arm and arm64 2018-11-10 21:02:32 +00:00
i386 Merge ^/head r340918 through r341763. 2018-12-09 11:39:45 +00:00
isa Reapply, with minor tweaks, r338025, from the original commit: 2018-09-26 17:12:14 +00:00
kern Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
kgssapi OpenCrypto: Convert sessions to opaque handles instead of integers 2018-07-18 00:56:25 +00:00
libkern mcount: tidy up ANSIfication 2018-10-20 22:39:35 +00:00
mips Remove stray hints files. 2018-12-10 21:33:01 +00:00
modules Merge ^/head r341764 through r341812. 2018-12-11 06:47:04 +00:00
net Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
net80211 Fix misspellings of transmitter/transmitted 2018-08-10 20:37:32 +00:00
netgraph ng_source(4): correction after the change r340617 2018-11-27 04:05:38 +00:00
netinet Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
netinet6 Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
netipsec Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
netpfil pf: Prevent integer overflow in PF when calculating the adaptive timeout. 2018-12-11 21:44:39 +00:00
netsmb Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
nfs
nfsclient
nfsserver
nlm
ofed ipoib: Notify on modify QP failure only when relevant 2018-12-05 13:27:17 +00:00
opencrypto Add sha224 to the authctx union. 2018-10-23 18:07:37 +00:00
powerpc powerpc/booke: Don't get and use the load offset for TOC on APs 2018-12-11 02:03:00 +00:00
riscv Remove an unused malloc(9) type. 2018-12-11 02:16:27 +00:00
rpc Set SO_SNDTIMEO in the client side krpc when CLSET_TIMEOUT is done. 2018-07-20 12:03:16 +00:00
security Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
sparc64 Plug memory disclosures via ptrace(2). 2018-12-03 20:54:17 +00:00
sys Continuing efforts to provide hardening of FFS. This change adds a 2018-12-11 22:14:37 +00:00
teken Implement ECMA-48 "REP", some Linuxen have started emitting them recently. 2018-10-21 08:29:36 +00:00
tests epoch_test: fix compile 2018-07-15 00:31:17 +00:00
tools Use ${ECHO} in dtb/dtbo build, pass in from dtb.mk for -s 2018-11-09 18:56:40 +00:00
ufs Continuing efforts to provide hardening of FFS. This change adds a 2018-12-11 22:14:37 +00:00
vm Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
x86 Fix the PAE kernel gcc build. 2018-12-11 16:49:01 +00:00
xdr
xen xen: legacy PVH fixes for the new interrupt count 2018-09-13 07:14:11 +00:00
Makefile