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

A potential bug of free of stack address #13

Open
ash1852 opened this issue Dec 17, 2021 · 1 comment
Open

A potential bug of free of stack address #13

ash1852 opened this issue Dec 17, 2021 · 1 comment

Comments

@ash1852
Copy link

ash1852 commented Dec 17, 2021

hello, I found a potential bug of free of stack address in source code of mysql, the overview of occurrence is shown as follows.
image
image
step1:
in mysql/sql-common/client.c line 3585
defined a local variable tmp_mysql in this line
image

step2:
in mysql/sql-common/client.c line 3615
in a path derived from step1,there is a call of mysql_close and stack address of tmp_mysql is used as 1st parameter
image

step3:
in mysql/sql-common/client.c line 3823
the parameter of function mysql_close is used as 1st parameter of function my_free
image

step4:
in mysql/mysys/my_malloc.c line 134
free of stack address here
image

@ash1852
Copy link
Author

ash1852 commented Dec 17, 2021

would you help check if this bug is true?thank you very much.

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