mirror_zfs/module/zfs
Brian Behlendorf 5f6d0b6f5a Handle block pointers with a corrupt logical size
The general strategy used by ZFS to verify that blocks are valid is
to checksum everything.  This has the advantage of being extremely
robust and generically applicable regardless of the contents of
the block.  If a blocks checksum is valid then its contents are
trusted by the higher layers.

This system works exceptionally well as long as bad data is never
written with a valid checksum.  If this does somehow occur due to
a software bug or a memory bit-flip on a non-ECC system it may
result in kernel panic.

One such place where this could occur is if somehow the logical
size stored in a block pointer exceeds the maximum block size.
This will result in an attempt to allocate a buffer greater than
the maximum block size causing a system panic.

To prevent this from happening the arc_read() function has been
updated to detect this specific case.  If a block pointer with an
invalid logical size is passed it will treat the block as if it
contained a checksum error.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2678
2014-10-23 09:20:52 -07:00
..
arc.c Handle block pointers with a corrupt logical size 2014-10-23 09:20:52 -07:00
blkptr.c
bplist.c
bpobj.c
bptree.c
dbuf_stats.c
dbuf.c Handle block pointers with a corrupt logical size 2014-10-23 09:20:52 -07:00
ddt_zap.c
ddt.c
dmu_diff.c
dmu_object.c Illumos 3693 - restore_object uses at least two transactions to restore an object 2014-10-21 15:26:50 -07:00
dmu_objset.c
dmu_send.c Illumos 5162 - zfs recv should use loaned arc buffer to avoid copy 2014-10-21 16:32:11 -07:00
dmu_traverse.c
dmu_tx.c
dmu_zfetch.c
dmu.c Illumos 5162 - zfs recv should use loaned arc buffer to avoid copy 2014-10-21 16:32:11 -07:00
dnode_sync.c
dnode.c
dsl_bookmark.c
dsl_dataset.c Illumos 5150 - zfs clone of a defer_destroy snapshot causes strangeness 2014-10-21 15:26:58 -07:00
dsl_deadlist.c
dsl_deleg.c
dsl_destroy.c
dsl_dir.c
dsl_pool.c
dsl_prop.c
dsl_scan.c
dsl_synctask.c
dsl_userhold.c
fm.c
gzip.c
lz4.c
lzjb.c
Makefile.in
metaslab.c Don't upgrade a metaslab when the pool is not writable 2014-08-18 08:47:19 -07:00
range_tree.c
refcount.c
rrwlock.c
sa.c
sha256.c
spa_boot.c
spa_config.c Update utsname support 2014-10-17 14:58:57 -07:00
spa_errlog.c
spa_history.c Update utsname support 2014-10-17 14:58:57 -07:00
spa_misc.c
spa_stats.c
spa.c Illumos 4924 - LZ4 Compression for metadata 2014-10-20 16:17:49 -07:00
space_map.c
space_reftree.c
txg.c
uberblock.c
unique.c
vdev_cache.c
vdev_disk.c
vdev_file.c
vdev_label.c
vdev_mirror.c Handle NULL mirror child vdev 2014-10-17 14:59:05 -07:00
vdev_missing.c
vdev_queue.c
vdev_raidz.c
vdev_root.c
vdev.c
zap_leaf.c
zap_micro.c
zap.c
zfeature_common.c Illumos 4924 - LZ4 Compression for metadata 2014-10-20 16:17:49 -07:00
zfeature.c
zfs_acl.c Don't perform ACL-to-mode translation on empty ACL 2014-10-21 09:23:27 -07:00
zfs_byteswap.c
zfs_ctldir.c
zfs_debug.c
zfs_dir.c
zfs_fm.c
zfs_fuid.c
zfs_ioctl.c Illumos 4924 - LZ4 Compression for metadata 2014-10-20 16:17:49 -07:00
zfs_log.c
zfs_onexit.c
zfs_replay.c
zfs_rlock.c
zfs_sa.c
zfs_vfsops.c
zfs_vnops.c Remove checks for mandatory locks 2014-10-22 11:06:53 -07:00
zfs_znode.c Remove checks for mandatory locks 2014-10-22 11:06:53 -07:00
zil.c
zio_checksum.c
zio_compress.c
zio_inject.c
zio.c
zle.c
zpl_ctldir.c
zpl_export.c
zpl_file.c Suppress AIO kmem warnings 2014-10-20 16:10:25 -07:00
zpl_inode.c
zpl_super.c Remove shrink_dcache_memory() and shrink_icache_memory() 2014-10-17 14:58:50 -07:00
zpl_xattr.c
zrlock.c
zvol.c