]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/dmu_diff.c
diff_cb() does not handle large dnodes
authorloli10K <loli10K@users.noreply.github.com>
Tue, 24 Sep 2019 19:01:37 +0000 (21:01 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 24 Sep 2019 19:01:37 +0000 (12:01 -0700)
commitd359e99c38f66732d42278c32d52cfcf1839aa4f
tree7206eb4767afe1f831c67f20cb7e77061e5176f8
parent73d7820bba26dd61085cb6dd8348ebf0bb41b951
diff_cb() does not handle large dnodes

Trying to 'zfs diff' a snapshot with large dnodes will incorrectly try
to access its interior slots when dnodesize > sizeof(dnode_phys_t).
This is normally not an issue because the interior slots are
zero-filled, which report_dnode() handles calling
report_free_dnode_range(). However this is not the case for encrypted
large dnodes or filesystem using many SA based xattrs where the extra
data past the legacy dnode size boundary is interpreted as a
dnode_phys_t.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tom Caputi <tcaputi@datto.com>
Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #7678
Closes #8931
Closes #9343
module/zfs/dmu_diff.c
tests/zfs-tests/tests/functional/cli_root/zfs_diff/zfs_diff_encrypted.ksh