forked from bgamble/pykerberos
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Segfault in authGSSClientWrap caused by freeing a stack allocated buffer (pykerberos >= 1.1.6) #15
Comments
behackett
changed the title
Segfault in authGSSClientWrap caused by freeing a stack allocated buffer (pykerberos >= 1.6)
Segfault in authGSSClientWrap caused by freeing a stack allocated buffer (pykerberos >= 1.1.6)
Feb 25, 2016
behackett
added a commit
to behackett/pykerberos
that referenced
this issue
Feb 25, 2016
02strich
added a commit
that referenced
this issue
Feb 29, 2016
Don't free stack allocated buffer #15
Yes, this part needs a lot more testing, Sadly I currently don't have the time to write them :( |
thanks for the fix |
Happy to help. :-) |
@02strich can we get a release cut for this? |
Sure, I will cut one tonight when I get home |
Thanks! |
Released as 1.1.11 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The regression occurred in version 1.1.6 with the following commit: 1de650c.
The author of that patch added a call to gss_release_buffer on input_token.value at the end of the function:
https://github.com/02strich/pykerberos/blob/v1.1.10/src/kerberosgss.c#L606-L607
The problem is that input_token.value is a stack allocated buffer:
https://github.com/02strich/pykerberos/blob/v1.1.10/src/kerberosgss.c#L560-L576
If authGSSClientWrap is called with the "user" option the interpreter segfaults. Here is the backtrace from gdb (with sensitive data redacted):
Remove the gss_release_buffer call. It would also be useful to add a test for authGSSClientUnwrap and authGSSClientWrap to avoid future regressions.
The text was updated successfully, but these errors were encountered: