zfs_ioc_space_snaps must check that firstsnap and lastsnap refer to snapshots
zfs_ioc_space_snaps() does not do much validation for
lastsnap names, nor does it check datasets corresponding to those names.
dsl_dataset_space_wouldfree asserts that its parameters are snapshots.
Thus, the following panic happens with a debug build if either of the parameters is an existing dataset, which is not a snapshot:
panic: assert: dsl_dataset_is_snapshot(lastsnap) ... panic() assfail() dsl_dataset_space_wouldfree() zfs_ioc_space_snaps() zfsdev_ioctl()
See also Issue #5945.
Updated by Electric Monk over 6 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 24218bebb460e4015fac2c9f2cec1902eddbcd7b Author: Andriy Gapon <firstname.lastname@example.org> Date: 2015-05-29T15:07:56.000Z 5946 zfs_ioc_space_snaps must check that firstsnap and lastsnap refer to snapshots 5945 zfs_ioc_send_space must ensure that fromsnap refers to a snapshot Reviewed by: Steven Hartland <email@example.com> Reviewed by: Matthew Ahrens <firstname.lastname@example.org> Approved by: Gordon Ross <email@example.com>