-
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
Incremental receives can destroy snapshots without the destroy permission #16943
Labels
Type: Defect
Incorrect behavior (e.g. crash, hang)
Comments
I agree: force receive basically allows rollbacks on destination pools where no rollback permission was granted. This seems wrong - should |
shodanshok
added a commit
to shodanshok/zfs
that referenced
this issue
Jan 26, 2025
Force receive (zfs receive -F) can rollback or destroy snapshots and file systems that do not exist on the sending side (see zfs-receive man page). This means an user having the receive permission can effectively delete data on receiving side, even if such user does not have explicit rollback or destroy permissions. This patch add the rollback permission requirement for forced receive. Fixes openzfs#16943 Signed-off-by: Gionatan Danti <[email protected]>
13 tasks
shodanshok
added a commit
to shodanshok/zfs
that referenced
this issue
Jan 29, 2025
Force receive (zfs receive -F) can rollback or destroy snapshots and file systems that do not exist on the sending side (see zfs-receive man page). This means an user having the receive permission can effectively delete data on receiving side, even if such user does not have explicit rollback or destroy permissions. This patch add the rollback permission requirement for force receive. To avoid changing current default behavior, a new zfs_recv_perm tunable is introduced. When set to 0 (default) the new permission check is disabled. When set to 1 rollback permission requirement is enabled. Fixes openzfs#16943 Signed-off-by: Gionatan Danti <[email protected]>
shodanshok
added a commit
to shodanshok/zfs
that referenced
this issue
Jan 31, 2025
Force receive (zfs receive -F) can rollback or destroy snapshots and file systems that do not exist on the sending side (see zfs-receive man page). This means an user having the receive permission can effectively delete data on receiving side, even if such user does not have explicit rollback or destroy permissions. This patch add the rollback permission requirement for force receive. To avoid changing current default behavior, a new tunable zfs_recv_force_needs_perm is introduced. When set to 0 (default) the new permission check is disabled. When set to 1 rollback permission requirement is enabled. Fixes openzfs#16943 Signed-off-by: Gionatan Danti <[email protected]>
shodanshok
added a commit
to shodanshok/zfs
that referenced
this issue
Jan 31, 2025
Force receive (zfs receive -F) can rollback or destroy snapshots and file systems that do not exist on the sending side (see zfs-receive man page). This means an user having the receive permission can effectively delete data on receiving side, even if such user does not have explicit rollback or destroy permissions. This patch add the rollback permission requirement for force receive. To avoid changing current default behavior, a new tunable zfs_recv_force_needs_perm is introduced. When set to 0 (default) the new permission check is disabled. When set to 1 rollback permission requirement is enabled. Fixes openzfs#16943 Signed-off-by: Gionatan Danti <[email protected]>
shodanshok
added a commit
to shodanshok/zfs
that referenced
this issue
Jan 31, 2025
Force receive (zfs receive -F) can rollback or destroy snapshots and file systems that do not exist on the sending side (see zfs-receive man page). This means an user having the receive permission can effectively delete data on receiving side, even if such user does not have explicit rollback or destroy permissions. This patch adds the append permission, which only permits limited, non-forced receive. Behavior for users with full receive permission is not changed in any way. Fixes openzfs#16943 Signed-off-by: Gionatan Danti <[email protected]>
13 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
System information
25.05.20250108.bffc22e (Warbler)
zfs-2.2.7-1
Describe the problem you're observing
If a user is delegated the
receive
permission, they can usezfs receive -F
on that dataset to destroy snapshots, even when they have not been granted therollback
ordestroy
permission on the same dataset.This may be as intended, but it is extremely surprising to me as a user. At the very least, the documentation should be updated to make this clear.
Describe how to reproduce the problem
Results:
rpool/test/dest
has two snapshots,@a
and@b
.rpool/test/dest@x
has been destroyed, despite the fact thatuser
did not have permission to destroy it directly. I would expect thatuser
does not have a way to do this.The text was updated successfully, but these errors were encountered: