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 context mech oids should be static #9

Closed
frozencemetery opened this issue Aug 26, 2020 · 0 comments · Fixed by #12
Closed

Security context mech oids should be static #9

frozencemetery opened this issue Aug 26, 2020 · 0 comments · Fixed by #12

Comments

@frozencemetery
Copy link
Member

Per RFC 274 section 5.1:

   mech_type            Object ID, modify, optional Security mechanism
                        used.  The returned OID value will be a pointer
                        into static storage, and should be treated as
			read-only by the caller (in particular, it does
                        not need to be freed).  If not required, specify
                        NULL.

This assumption is shared by the krb5 mechglue, which assumes this parameter can be requested without needing additional memory overhead. However, this causes the following valgrind trace from t_acquire (test_0.log):

==38725== 25 (16 direct, 9 indirect) bytes in 1 blocks are definitely lost in loss record 14 of 67
==38725==    at 0x483BAE9: calloc (vg_replace_malloc.c:760)
==38725==    by 0x53E325D: gp_conv_gssx_to_oid_alloc (gp_conv.c:82)
==38725==    by 0x53E8B04: gpm_accept_sec_context (gpm_accept_sec_context.c:75)
==38725==    by 0x53EFCCD: gssi_accept_sec_context (gpp_accept_sec_context.c:101)
==38725==    by 0x488ADF2: gss_accept_sec_context (g_accept_sec_context.c:266)
==38725==    by 0x401AD8: main (t_acquire.c:83)
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

Successfully merging a pull request may close this issue.

1 participant