HomeFreeBSD

When loading an inode from disk, verify that its mode is valid.

Description

When loading an inode from disk, verify that its mode is valid.
If invalid, return EINVAL. Note that inode check-hashes greatly
reduce the chance that these errors will go undetected.

Reported by: Christopher Krah <krah@protonmail.com>
Reported as: FS-5-UFS-2: Denial Of Service in nmount-3 (ffs_read)
Reviewed by: kib
MFC after: 1 week
Sponsored by: Netflix

M sys/fs/ext2fs/ext2_vnops.c
M sys/kern/vfs_subr.c
M sys/ufs/ffs/ffs_snapshot.c
M sys/ufs/ufs/ufs_vnops.c

Details

Provenance
mckusickAuthored on
Reviewer
kib
Parents
rS342547: Remove another empty #ifdef block. This empty block also exists in
Branches
Unknown
Tags
Unknown