-
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
use-after-free in dsl_dataset_promote_sync() #16272
Labels
Type: Defect
Incorrect behavior (e.g. crash, hang)
Comments
This apparent bug was introduced in commit |
Thanks for catching this, you are correct, I will submit a PR. |
gamanakis
added a commit
to gamanakis/zfs
that referenced
this issue
Jul 2, 2024
In the commit of the head_errlog feature we introduced a bug in dsl_dataset_promote_sync(): we may dereference origin_head and hds, both dereferencing ddpa after calling promote_sync() on ddpa. Closes: openzfs#16272 Signed-off-by: George Amanakis <gamanakis@gmail.com>
gamanakis
added a commit
to gamanakis/zfs
that referenced
this issue
Jul 2, 2024
In the commit of the head_errlog feature we introduced a bug in dsl_dataset_promote_sync(): we may dereference origin_head and hds, both dereferencing ddpa after calling promote_sync() on ddpa. Closes: openzfs#16272 Signed-off-by: George Amanakis <gamanakis@gmail.com>
13 tasks
gamanakis
added a commit
to gamanakis/zfs
that referenced
this issue
Jul 12, 2024
In the commit of the head_errlog feature we introduced a bug in dsl_dataset_promote_sync(): we may dereference origin_head and hds, both dereferencing ddpa after calling promote_sync() on ddpa. Closes: openzfs#16272 Signed-off-by: George Amanakis <gamanakis@gmail.com>
behlendorf
pushed a commit
that referenced
this issue
Jul 15, 2024
In the commit of the head_errlog feature we introduced a bug in dsl_dataset_promote_sync(): we may dereference origin_head and hds, both dereferencing ddpa after calling promote_sync() on ddpa. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Chunwei Chen <david.chen@nutanix.com> Reviewed-by: Rob Norris <robn@despairlabs.com> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: George Amanakis <gamanakis@gmail.com> Closes #16272 Closes #16273
calccrypto
pushed a commit
to hpc/zfs
that referenced
this issue
Jul 17, 2024
In the commit of the head_errlog feature we introduced a bug in dsl_dataset_promote_sync(): we may dereference origin_head and hds, both dereferencing ddpa after calling promote_sync() on ddpa. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Chunwei Chen <david.chen@nutanix.com> Reviewed-by: Rob Norris <robn@despairlabs.com> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: George Amanakis <gamanakis@gmail.com> Closes openzfs#16272 Closes openzfs#16273
ptr1337
pushed a commit
to CachyOS/zfs
that referenced
this issue
Aug 4, 2024
In the commit of the head_errlog feature we introduced a bug in dsl_dataset_promote_sync(): we may dereference origin_head and hds, both dereferencing ddpa after calling promote_sync() on ddpa. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Chunwei Chen <david.chen@nutanix.com> Reviewed-by: Rob Norris <robn@despairlabs.com> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: George Amanakis <gamanakis@gmail.com> Closes openzfs#16272 Closes openzfs#16273
lundman
pushed a commit
to openzfsonwindows/openzfs
that referenced
this issue
Sep 4, 2024
In the commit of the head_errlog feature we introduced a bug in dsl_dataset_promote_sync(): we may dereference origin_head and hds, both dereferencing ddpa after calling promote_sync() on ddpa. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Chunwei Chen <david.chen@nutanix.com> Reviewed-by: Rob Norris <robn@despairlabs.com> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: George Amanakis <gamanakis@gmail.com> Closes openzfs#16272 Closes openzfs#16273
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
Running the ZFS test suite with KASAN triggered a panic:
This corresponds to the dereference of
origin_head
at the very end ofdsl_dataset_promote_sync()
.Describe how to reproduce the problem
It is not consistently reproducible, so far I only hit this once.
I believe the problem is that
origin_head
andhds
are not safe to dereference afterpromote_rele()
is called. Either the object IDs should be loaded before the references are released, or references should be released after callingspa_swap_errlog()
.The text was updated successfully, but these errors were encountered: