HomeFreeBSD

Verify embedded blkptr's in arc_read()

Description

Verify embedded blkptr's in arc_read()

The block pointer verification check in arc_read() should also
cover embedded block pointers. While highly unlikely, accessing
a damaged block pointer can result in panic. To further harden
the code extend the existing check to include embedded block
pointers and add a comment explaining the rational for this
sanity check. Lastly, correct a flaw in zfs_blkptr_verify()
so the error count is checked even when checking a untrusted
config to verify the non-pool-specific portions of a block
pointer.

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #12535

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Sep 10 2021, 1:02 AM
Tony Hutter <hutter2@llnl.gov>Committed on Sep 14 2021, 10:43 PM
Parents
rG32512acbc07b: Linux 5.15 compat: get_acl()
Branches
Unknown
Tags
Unknown

Event Timeline

Tony Hutter <hutter2@llnl.gov> committed rG9183321501da: Verify embedded blkptr's in arc_read() (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Sep 14 2021, 10:43 PM