[38828] in Kerberos

home help back first fref pref prev next nref lref last post

Re: libkrb5 failed to alloc memory

daemon@ATHENA.MIT.EDU (Ming Zhi)
Tue Oct 27 02:00:27 2020

MIME-Version: 1.0
In-Reply-To: <2bb0e24c-ec3a-86ba-7ae4-c688cc003573@mit.edu>
From: Ming Zhi <woodhead99@gmail.com>
Date: Tue, 27 Oct 2020 13:57:29 +0800
Message-ID: <CAAYuYkr+otsnS2HGAitXtkyJPrihAe5z8sMNW9ytT_8J3Vzjgw@mail.gmail.com>
To: Greg Hudson <ghudson@mit.edu>, kerberos@mit.edu
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: kerberos-bounces@mit.edu

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@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.
>
________________________________________________
Kerberos mailing list           Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos

home help back first fref pref prev next nref lref last post