1
0
mirror of https://git.proxmox.com/git/mirror_zfs.git synced 2025-04-06 17:49:11 +03:00
mirror_zfs/module
Tom Caputi 61152d1069 Fix errata handling for resuming streams
Currently, the handling for errata  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  
Closes 
2020-01-14 12:25:20 -08:00
..
avl Wrap Linux module macros 2019-11-01 10:41:03 -07:00
icp Static symbols exported by ICP 2020-01-02 18:08:45 -08:00
lua cppcheck: (error) Address of local auto-variable assigned 2019-12-18 17:25:42 -08:00
nvpair cppcheck: (warning) Possible null pointer dereference: nvh 2019-12-18 17:25:57 -08:00
os KMC_KVMEM disrupts kv_alloc() memory alignment expectations 2020-01-14 09:09:59 -08:00
spl OpenZFS restructuring - move platform specific sources 2019-09-06 11:26:26 -07:00
unicode Wrap Linux module macros 2019-11-01 10:41:03 -07:00
zcommon Fix "zpool add -n" for dedup, special and log devices 2020-01-06 15:40:06 -08:00
zfs Fix errata handling for resuming streams 2020-01-14 12:25:20 -08:00
.gitignore Adapt gitignore for modules 2019-12-02 13:23:47 -08:00
Makefile.in module/Makefile.in: don't run xargs if empty 2019-10-08 10:10:23 -07:00