Skip to content
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

[Security] Use after free in enclave #2

Open
mustakimur opened this issue Jun 13, 2019 · 0 comments
Open

[Security] Use after free in enclave #2

mustakimur opened this issue Jun 13, 2019 · 0 comments

Comments

@mustakimur
Copy link

mustakimur commented Jun 13, 2019

ecall_closedb() must set db pointer to NULL after free the object.

void ecall_closedb(){
    sqlite3_close(db);
    db = NULL; // change
    ocall_println_string("Enclave: Closed database connection");
}

Otherwise a check like:

  if (db == 0){
     return ERR;
  }
  magic = db->magic_byte;

will fail from multiple places.

@mustakimur mustakimur changed the title possible uaf because of missing unset pointer [Security] Use after free in enclave Jul 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant