opnsense-src/sys
Kirk McKusick 076002f24d Do comprehensive UFS/FFS superblock integrity checks when reading a superblock.
Historically only minimal checks were made of a superblock when it
was read in as it was assumed that fsck would have been run to
correct any errors before attempting to use the filesystem. Recently
several bug reports have been submitted reporting kernel panics
that can be triggered by deliberately corrupting filesystem superblocks,
see Bug 263979 - [meta] UFS / FFS / GEOM crash (panic) tracking
which is tracking the reported corruption bugs.

This change upgrades the checks that are performed. These additional
checks should prevent panics from a corrupted superblock. Although
it appears in only one place, the new code will apply to the kernel
modules and (through libufs) user applications that read in superblocks.

Reported by:  Robert Morris and Neeraj
Reviewed by:  kib
Tested by:    Peter Holm
PR:           263979
MFC after:    1 month
Differential Revision: https://reviews.freebsd.org/D35219
2022-05-27 12:22:07 -07:00
..
amd64 irdma: Add RDMA driver for Intel(R) Ethernet Controller E810 2022-05-23 16:52:49 -07:00
arm Fix an indentation bug in the bcm pci driver 2022-05-23 18:24:04 +01:00
arm64 Save only callee-saved registers in pcb 2022-05-25 11:26:30 +01:00
bsm
cam kerneldump: remove physical argument from d_dumper 2022-05-13 10:42:48 -03:00
cddl boot/zfs: Extend zfsimpl.h and make it easier to use 2022-05-21 14:30:35 -04:00
compat linuxkpi: Rework detach function 2022-05-25 09:57:10 +02:00
conf irdma: Add RDMA driver for Intel(R) Ethernet Controller E810 2022-05-23 16:52:49 -07:00
contrib LinuxKPI 802.11 / iwlwifi / rtw88 : re-factor ieee802211_sta for MLO 2022-05-20 18:45:18 +00:00
crypto crypto: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-06 15:46:58 -07:00
ddb kerneldump: remove physical from dump routines 2022-05-13 10:43:19 -03:00
dev cxgbei: Adjust the calculation for the maximum ISO payload. 2022-05-26 14:32:54 -07:00
dts sys/dts: Remove MIPS files 2022-05-20 17:11:27 +01:00
fs fusefs: handle evil servers that return illegal inode numbers 2022-05-12 14:32:26 -06:00
gdb gdb(4): Do not use run length encoding for 3-symbol repetitions 2022-01-22 14:46:06 -05:00
geom kerneldump: remove physical from dump routines 2022-05-13 10:43:19 -03:00
gnu bwn: eliminate dead writes in BWN_GPL_PHY 2022-05-04 09:32:59 -04:00
i386 linux(4): Deduplicate execve 2022-05-23 13:18:41 +03:00
isa isa: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-06 15:46:59 -07:00
kern sockbuf: remove unused mbuf counter and cluster counter 2022-05-27 08:20:17 -07:00
kgssapi kgssapi krb5: Remove unused variables. 2022-04-06 16:45:29 -07:00
libkern libkern: Fix two typos in source code comments 2022-04-09 09:36:34 +02:00
modules irdma: Add RDMA driver for Intel(R) Ethernet Controller E810 2022-05-23 16:52:49 -07:00
net arp: Implement sticky ARP mode for interfaces. 2022-05-27 12:41:30 +00:00
net80211 net80211: remove (optional) RSN from preobereq 2022-05-17 22:33:10 +00:00
netgraph sockbuf: merge two versions of sbcreatecontrol() into one 2022-05-17 10:10:42 -07:00
netinet arp: Implement sticky ARP mode for interfaces. 2022-05-27 12:41:30 +00:00
netinet6 sockbuf: improve sbcreatecontrol() 2022-05-17 10:10:42 -07:00
netipsec ipsec_encap: setdf is only used for INET. 2022-04-13 16:08:21 -07:00
netpfil pf: call dummynet directly from the ethernet code 2022-05-20 14:49:31 +02:00
netsmb smb_smb_treedisconnect: eliminate write only variable mbp 2022-04-04 22:30:57 -06:00
nfs nfs: do not panic on bootpc_init when no interfaces are found 2022-04-07 19:33:26 -03:00
nfsclient
nfsserver
nlm
ofed ibcore: Fix possible memory leak in ib_mad_post_receive_mads() 2022-05-19 10:13:06 +02:00
opencrypto crypto: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-06 15:46:58 -07:00
powerpc Retire sv_transtrap 2022-05-20 14:54:03 +03:00
riscv Retire sv_transtrap 2022-05-20 14:54:03 +03:00
rpc krpc: Fix NFS-over-TLS for KTLS1.3 2022-05-15 11:51:56 -07:00
security mac_pimd: Support for privilege drop in pimd 2022-04-20 08:07:37 +02:00
sys sockbuf: remove unused mbuf counter and cluster counter 2022-05-27 08:20:17 -07:00
teken teken: color #3 is yellow not brown - use TC_YELLOW as the name 2022-03-12 09:17:29 -05:00
tests
tools syscallarg_t: Add a type for system call arguments 2022-03-28 19:43:03 +01:00
ufs Do comprehensive UFS/FFS superblock integrity checks when reading a superblock. 2022-05-27 12:22:07 -07:00
vm vm_phys: avoid waste in multipage allocation 2022-04-26 02:56:23 -05:00
x86 linux(4): Deduplicate bsd_to_linux_trapcode() 2022-05-23 13:16:58 +03:00
xdr
xen xen: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-06 15:46:58 -07:00
Makefile