HomeFreeBSD

UFS2: Fix DoS due to corrupted extattrfile

Description

UFS2: Fix DoS due to corrupted extattrfile

Prior versions of FreeBSD (11.x) may have produced a corrupt extattr file.
(Specifically, r312416 accidentally fixed this defect by removing a strcpy.)
CURRENT FreeBSD supports disk images from those prior versions of FreeBSD.
Validate the internal structure as soon as we read it in from disk, to
prevent these extattr files from causing invariants violations and DoS.

Attempting to access the extattr portion of these files results in
EINTEGRITY. At this time, the only way to repair files damaged in this way
is to copy the contents to another file and move it over the original.

PR: 244089
Reported by: Andrea Venturoli <ml AT netfence.it>
Reviewed by: kib
Discussed with: mckusick (earlier draft)

(cherry picked from commit e6790841f749b3cc1ac7d338181d9358aae04d0b)

Details

Provenance
cemAuthored on Oct 30 2020, 7:00 PM
emasteCommitted on Jan 5 2021, 1:56 PM
Parents
rG6a45b9926f2e: gdb(4) fix x86 signal reporting
Branches
Unknown
Tags
Unknown