Project

General

Profile

Actions

Bug #5945

closed

zfs_ioc_send_space must ensure that fromsnap refers to a snapshot

Added by Andriy Gapon over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
zfs - Zettabyte File System
Start date:
2015-05-22
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:

Description

Currently neither zfs_ioc_send_space nor dmu_send_estimate check that fromsnap is a snapshot name and fromds is a snapshot datatset.
But dsl_dataset_is_before has an assertion about that.
So, if a name of an existing filesystem is passed as fromsnap then the following panic occurs in a debug build:

panic: dsl_dataset_is_snapshot(earlier) || earlier_txg != 0
...
panic()
assfail()
dsl_dataset_is_before()
dmu_send_estimate()
zfs_ioc_send_space()
zfsdev_ioctl()

Actions #2

Updated by Electric Monk over 6 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 24218bebb460e4015fac2c9f2cec1902eddbcd7b

commit  24218bebb460e4015fac2c9f2cec1902eddbcd7b
Author: Andriy Gapon <avg@freebsd.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 <killing@multiplay.co.uk>
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Approved by: Gordon Ross <gordon.ross@nexenta.com>

Actions

Also available in: Atom PDF