-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenZFS 2.2.0 copy_file_range(2) from unencrypted to encrypted panic #15464
Labels
Type: Defect
Incorrect behavior (e.g. crash, hang)
Comments
mmatuska
added a commit
to mmatuska/zfs
that referenced
this issue
Oct 30, 2023
When copying data to or from an encrypted dataset, block cloning should be used only when it is the same dataset. The current code checked only if the source was encrypted and the check should happen more early to avoid unnecessary operations. We may relax this condition in the future by supporting block cloning between encrypted datasets using the same key. Fixes openzfs#15464 Signed-off-by: Martin Matuska <[email protected]>
13 tasks
mmatuska
added a commit
to mmatuska/zfs
that referenced
this issue
Oct 30, 2023
Block cloning from an encrypted dataset into an unencrypted dataset and vice versa is not possible. The current code did allow cloning unencrypted files into an encrypted dataset causing a panic when these were accessed. Block cloning between encrypted and encrypted is currently supported on the same filesystem only. Fixes openzfs#15464 Signed-off-by: Martin Matuska <[email protected]>
mmatuska
added a commit
to mmatuska/zfs
that referenced
this issue
Oct 30, 2023
Block cloning from an encrypted dataset into an unencrypted dataset and vice versa is not possible. The current code did allow cloning unencrypted files into an encrypted dataset causing a panic when these were accessed. Block cloning between encrypted and encrypted is currently supported on the same filesystem only. Fixes openzfs#15464 Signed-off-by: Martin Matuska <[email protected]>
I suspect this was also #15275 |
mmatuska
added a commit
to mmatuska/zfs
that referenced
this issue
Nov 3, 2023
Block cloning from an encrypted dataset into an unencrypted dataset and vice versa is not possible. The current code did allow cloning unencrypted files into an encrypted dataset causing a panic when these were accessed. Block cloning between encrypted and encrypted is currently supported on the same filesystem only. Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Kay Pedersen <[email protected]> Reviewed-by: Rob N <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Martin Matuska <[email protected]> Closes openzfs#15464 Closes openzfs#15465
behlendorf
pushed a commit
that referenced
this issue
Nov 6, 2023
Block cloning from an encrypted dataset into an unencrypted dataset and vice versa is not possible. The current code did allow cloning unencrypted files into an encrypted dataset causing a panic when these were accessed. Block cloning between encrypted and encrypted is currently supported on the same filesystem only. Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Kay Pedersen <[email protected]> Reviewed-by: Rob N <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Martin Matuska <[email protected]> Closes #15464 Closes #15465
omfg this made it into a release? I don't see any testing improvements in the PR that fixed it. Surely something as fundamental as cp should get some testing love. |
13 tasks
lundman
pushed a commit
to openzfsonwindows/openzfs
that referenced
this issue
Dec 12, 2023
Block cloning from an encrypted dataset into an unencrypted dataset and vice versa is not possible. The current code did allow cloning unencrypted files into an encrypted dataset causing a panic when these were accessed. Block cloning between encrypted and encrypted is currently supported on the same filesystem only. Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Kay Pedersen <[email protected]> Reviewed-by: Rob N <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Martin Matuska <[email protected]> Closes openzfs#15464 Closes openzfs#15465
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
System information
Describe the problem you're observing
When copying a file using copy_file_range(2) e.g. using cp(1) from an unencrypted dataset to an encrypted dataset on the same pool, the target file is not readable and the process hangs. The pool reports a corrupted file. The same problem happens on FreeBSD, too.
Describe how to reproduce the problem
Create an encrypted dataset and copy a file from an unencrypted dataset on the same pool using cp(1).
When you copy the same file with rsync(1), it is copied correctly.
Include any warning/errors/backtraces from the system logs
The text was updated successfully, but these errors were encountered: