Re: libkrb5 failed to alloc memory

Ming Zhi <[email protected]>
Newsgroups gmane.comp.encryption.kerberos.general
Message-ID <CAAYuYkr+otsnS2HGAitXtkyJPrihAe5z8sMNW9ytT_8J3Vzjgw@mail.gmail.com>
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 <[email protected]> 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.
>
________________________________________________
Kerberos mailing list           [email protected]
https://mailman.mit.edu/mailman/listinfo/kerberos
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.