libkrb5 failed to alloc memory

Ming Zhi woodhead99 at gmail.com
Tue Oct 27 01:57:29 EDT 2020


Greg,
Yes, the heap should have been corrupted.
Instead of using valgrind, I chose to review my code again.  And found that
'gss_buffer_desc' passed to 'gss_import_name' had the `length' set to
'strlen() + 1' with the terminal '\0' included. Probably it is the cause of
the heap corruption.

many thanks :-)



On Mon, Oct 26, 2020 at 3:39 AM Greg Hudson <ghudson at mit.edu> wrote:

> On 10/25/20 1:31 AM, Ming Zhi wrote:
> > I have encountered a very rare situation, that the libkrb5 raised an
> > exception with the message "malloc: invalid size (unsorted)", and the
> host
> > process quit afterwards.
>
> This message is an indication that the heap was corrupted prior to the
> malloc() call.  You might be able to use valgrind to determine where the
> heap corruption occurred.
>
> > At the same time, sssd_kcm kept at very high CPU
> > usage till kinit succeeded.
>
> I don't have any insight into this part.
>


More information about the Kerberos mailing list