Files
mirror_zfs/include/sys
Tom Caputi 61152d1069 Fix errata #4 handling for resuming streams
Currently, the handling for errata #4 has two issues which allow
the checks for this issue to be bypassed using resumable sends.
The first issue is that drc->drc_fromsnapobj is not set in the
resuming code as it is in the non-resuming code. This causes
dsl_crypto_recv_key_check() to skip its checks for the
from_ivset_guid. The second issue is that resumable sends do not
clean up their on-disk state if they fail the checks in
dmu_recv_stream() that happen before any data is received.

As a result of these two bugs, a user can attempt a resumable send
of a dataset without a from_ivset_guid. This will fail the initial
dmu_recv_stream() checks, leaving a valid resume state. The send
can then be resumed, which skips those checks, allowing the receive
to be completed.

This commit fixes these issues by setting drc->drc_fromsnapobj in
the resuming receive path and by ensuring that resumablereceives
are properly cleaned up if they fail the initial dmu_recv_stream()
checks.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #9818 
Closes #9829
2020-01-14 12:25:20 -08:00
..
2019-08-30 09:53:15 -07:00
2019-03-29 09:13:20 -07:00
2019-08-30 09:53:15 -07:00
2019-10-09 10:36:03 -07:00
2019-10-09 10:36:03 -07:00
2019-07-26 10:54:14 -07:00
2019-07-26 10:54:14 -07:00
2019-06-19 09:48:12 -07:00
2019-10-11 10:13:21 -07:00
2019-07-08 13:18:50 -07:00
2019-06-19 14:54:02 -07:00
2019-06-19 09:48:12 -07:00
2019-07-26 10:54:14 -07:00
2019-06-19 09:48:12 -07:00
2020-01-10 10:16:58 -08:00
2019-06-19 09:48:12 -07:00
2019-07-25 11:57:58 -07:00
2019-06-19 09:48:12 -07:00
2019-06-24 16:44:01 -07:00
2019-07-26 10:54:14 -07:00
2019-07-26 10:54:14 -07:00
2013-11-04 11:17:48 -08:00
2019-08-30 09:53:15 -07:00
2017-12-07 10:28:50 -08:00
2017-10-11 16:54:48 -04:00
2019-11-01 10:41:03 -07:00
2018-05-29 16:00:33 -07:00
2018-10-03 15:30:55 -07:00
2019-06-19 09:48:12 -07:00
2019-09-12 13:33:44 -07:00
2019-10-31 10:38:03 -07:00
2019-09-27 10:46:28 -07:00
2019-08-30 09:53:15 -07:00
2019-07-16 10:11:49 -07:00
2019-07-16 10:11:49 -07:00
2019-08-30 09:53:15 -07:00
2017-07-13 13:54:00 -04:00
2013-11-04 10:55:25 -08:00
2019-03-29 09:13:20 -07:00
2019-08-30 09:53:15 -07:00
2019-03-29 09:13:20 -07:00
2019-11-27 10:15:01 -08:00
2019-06-12 13:13:09 -07:00
2018-02-08 15:28:18 -08:00
2018-02-08 15:28:18 -08:00
2019-08-30 09:53:15 -07:00
2019-10-25 13:38:37 -07:00
2018-05-29 16:00:33 -07:00
2019-11-01 10:37:33 -07:00
2018-02-13 14:54:54 -08:00
2018-09-06 21:44:52 -07:00
2019-06-10 11:48:42 -07:00
2019-11-21 09:32:57 -08:00
2017-03-29 12:24:51 -07:00
2019-08-30 09:53:15 -07:00
2019-03-29 09:13:20 -07:00
2019-07-26 10:54:14 -07:00
2019-11-01 10:37:33 -07:00
2019-09-25 09:20:30 -07:00