Created attachment 218061 [details] libzfs_sendrecv.c.diff After https://svnweb.freebsd.org/base?view=revision&revision=354568 > zfs send -R -I pool/test1@snap | zfs recv -F pool/test2 works incorrectly. Snapshots deleted on pool/test1 are not deleted on pool/test2.
ping
"Works incorrectly" is not a bug report. When reporting a bug to FreeBSD or any other project, you should provide a complete description of the problem, including exact steps to reproduce it, the problem's symptoms, and what you expect to happen instead.
(In reply to Alan Somers from comment #2) >Snapshots deleted on pool/test1 are not deleted on pool/test2. ALL steps: > zfs create pool/test1 > zfs snap pool/test1@snap1 > zfs send -R pool/test1@snap1 | zfs recv -F pool/test2 > zfs snap pool/test1@snap2 > zfs send -R -I pool/test1@snap1 pool/test1@snap2 | zfs recv -F pool/test2 > zfs destroy pool/test1@snap1 > zfs snap pool/test1@snap3 > zfs send -R -I pool/test1@snap2 pool/test1@snap3 | zfs recv -F pool/test2 ^^^ after last step, @snap1 should also be deleted on pool/test2.
Reproduced on stable/12 at r366189M. Cannot reproduce on head.
(In reply to Alan Somers from comment #4) HEAD doesn't have this typo.
Created attachment 218957 [details] Fix error merging r354116 from OpenZFS When we merged 4c0883fb4af0d5565459099b98fcf90ecbfa1ca1 from OpenZFS (svn r354116), there were some merge conflicts. One of those was resolved incorrectly, causing "zfs receive" to fail to delete snapshots that a "zfs send -R" stream has deleted. This change corrects that merge conflict, and also reduces some harmless diffs vis-a-vis OpenZFS that were also introduced by r354116. Direct commit to stable/12 because head has moved on to OpenZFS.
Is this going to be fixed, and in case it is, will it be merged to 12.2? I am asking because 12.1 is approaching its EoL, but this issue seems to be serious enough for me to refrain from upgrading to 12.2.
(In reply to andriys from comment #7) It doesn't seem to have made it into 12.2-RELEASE as the last code commit to the affected file in the release/12.2.0 tree was on October 6th. I don't know what the plans are to include it in 12.2-p<something>, if any. You might either need to hand merge it yourself or use 12-STABLE instead of 12.2-RELEASE. Note that if you choose this path, freebsd-update will no longer work correctly on your system(s) as it only supports -RELEASE and -RELEASE-p<something> systems, except when it says it specifically supports beta releases during the beta period.
A commit references this bug: Author: asomers Date: Tue Dec 1 15:15:19 UTC 2020 New revision: 368233 URL: https://svnweb.freebsd.org/changeset/base/368233 Log: Fix error merging r354116 from OpenZFS When we merged 4c0883fb4af0d5565459099b98fcf90ecbfa1ca1 from OpenZFS (svn r354116), there were some merge conflicts. One of those was resolved incorrectly, causing "zfs receive" to fail to delete snapshots that a "zfs send -R" stream has deleted. This change corrects that merge conflict, and also reduces some harmless diffs vis-a-vis OpenZFS that were also introduced by the same revision. Direct commit to stable/12 because head has moved on to OpenZFS. PR: 249438 Reported by: Dmitry Wagin <dmitry.wagin@ya.ru> Reviewed by: mmacy Sponsored by: Axcient Changes: stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c stable/12/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h
Is there any ETA for this fix being issued as an errata for 12.2-RELEASE now that has been committed to stable/12 ?
Only the security officer, so@FreeBSD.org, can approve an errata. Dear Security Officer (CC'd), do you consider this bug serious enough to warrant an errata? The bad stuff is that ZFS snapshots could be wrongly left around after a zfs recv.
(In reply to Alan Somers from comment #11) Just to add my two cents, I find this to be a pretty big issue because if somebody has an entire setup with a bunch of automated scripts set up to log and/or handle any errors, like snapshots not being deleted, this would mess that up. Frankly, as I understand this issue, it could even be said that this is, de facto, a new behaviour of "zfs recv" in specific situations in the -STABLE branch which goes against the classic FreeBSD ethos of being predictable and not introducing breaking changes and behaviours overnight. By the way, thanks for your efforts in resolving the issue.
(In reply to Alan Somers from comment #11) The errata template is available at https://www.freebsd.org/security/errata-template.txt; if you can fill out as much of that as possible (in particular the background, impact etc. sections) secteam can take care of including it in the next errata batch.
Created attachment 220151 [details] Partially complete errata notice Here is a partially completed errata notice that secteam can use, if they decide to issue an errata for this.
Any updates on this?
Any updates on merging this fix to 12.2, please? The https://www.freebsd.org/releases/12.2R/errata.html says "An Errata Notice is planned for 12.2-RELEASE" for this issue. And with 12.1 approaching its EOL in just one week this is getting pretty important.
(In reply to andriys from comment #16) I agree with this, especially considering that an errata was actively promised at the release of 12.2. I could understand if we were talking about an errata for some obscure utility in base that has few uses but this is something as huge as ZFS. So, I would hope that the Security Team, so@FreeBSD.org, would give priority to this considering the explicit promise of an errata.
This is in the pipeline for the upcoming batch of errata. freebsd-update builds are running now.
A commit in branch releng/12.2 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=545f860883cf02fc152696186436ffe6adf8f1a7 commit 545f860883cf02fc152696186436ffe6adf8f1a7 Author: Alan Somers <asomers@FreeBSD.org> AuthorDate: 2020-12-01 15:15:18 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2021-01-29 01:14:30 +0000 Fix error merging r354116 from OpenZFS When we merged 4c0883fb4af0d5565459099b98fcf90ecbfa1ca1 from OpenZFS (svn r354116), there were some merge conflicts. One of those was resolved incorrectly, causing "zfs receive" to fail to delete snapshots that a "zfs send -R" stream has deleted. This change corrects that merge conflict, and also reduces some harmless diffs vis-a-vis OpenZFS that were also introduced by the same revision. Direct commit to stable/12 because head has moved on to OpenZFS. PR: 249438 Reported by: Dmitry Wagin <dmitry.wagin@ya.ru> Reviewed by: mmacy Sponsored by: Axcient (cherry picked from commit 861515418ac385f4198c38c28f6203135d72e651) Approved by: so .../lib/libzfs/common/libzfs_sendrecv.c | 43 +++++++++++----------- .../contrib/opensolaris/uts/common/sys/fs/zfs.h | 14 +++---- 2 files changed, 28 insertions(+), 29 deletions(-)
MARKED AS SPAM