Re: [SSSD] [PATCH] krb5_child: Fix use after free

2014-04-08 Thread Jakub Hrozek
On Tue, Apr 08, 2014 at 01:00:27PM +0200, Sumit Bose wrote: > On Tue, Apr 08, 2014 at 11:28:05AM +0200, Sumit Bose wrote: > > On Tue, Apr 08, 2014 at 11:02:34AM +0200, Lukas Slebodnik wrote: > > > > > > > Attached patch use the same approach as in ldap_child. > > > > To bring this thread to an end

Re: [SSSD] [PATCH] krb5_child: Fix use after free

2014-04-08 Thread Sumit Bose
On Tue, Apr 08, 2014 at 11:28:05AM +0200, Sumit Bose wrote: > On Tue, Apr 08, 2014 at 11:02:34AM +0200, Lukas Slebodnik wrote: > > > > > Attached patch use the same approach as in ldap_child. > > To bring this thread to an end, I think it is ok for the time being to > do the same as ldap_child and

Re: [SSSD] [PATCH] krb5_child: Fix use after free

2014-04-08 Thread Sumit Bose
On Tue, Apr 08, 2014 at 11:02:34AM +0200, Lukas Slebodnik wrote: > On (07/04/14 22:21), Sumit Bose wrote: > >On Mon, Apr 07, 2014 at 09:20:50PM +0200, Lukas Slebodnik wrote: > >> On (07/04/14 21:01), Sumit Bose wrote: > >> >On Mon, Apr 07, 2014 at 08:39:07PM +0200, Jakub Hrozek wrote: > >> >> On Mo

Re: [SSSD] [PATCH] krb5_child: Fix use after free

2014-04-08 Thread Sumit Bose
On Mon, Apr 07, 2014 at 10:36:39PM +0200, Lukas Slebodnik wrote: > On (07/04/14 22:21), Sumit Bose wrote: > >On Mon, Apr 07, 2014 at 09:20:50PM +0200, Lukas Slebodnik wrote: > >> but there is no difference. You allocate debug_prg_name on NULL and then > >> steal > >> to another talloc context. (li

Re: [SSSD] [PATCH] krb5_child: Fix use after free

2014-04-08 Thread Lukas Slebodnik
On (07/04/14 22:21), Sumit Bose wrote: >On Mon, Apr 07, 2014 at 09:20:50PM +0200, Lukas Slebodnik wrote: >> On (07/04/14 21:01), Sumit Bose wrote: >> >On Mon, Apr 07, 2014 at 08:39:07PM +0200, Jakub Hrozek wrote: >> >> On Mon, Apr 07, 2014 at 08:35:20PM +0200, Lukas Slebodnik wrote: >> >> > On (07/

Re: [SSSD] [PATCH] krb5_child: Fix use after free

2014-04-07 Thread Lukas Slebodnik
On (07/04/14 21:01), Sumit Bose wrote: >On Mon, Apr 07, 2014 at 08:39:07PM +0200, Jakub Hrozek wrote: >> >> Except first patch didn't allocate on NULL? I think that was the meat of >> Sumit's comments.. > >yes, just allocate on NULL and free it explicitly in the end to make >valgrind happy. It is e

Re: [SSSD] [PATCH] krb5_child: Fix use after free

2014-04-07 Thread Lukas Slebodnik
On (07/04/14 22:21), Sumit Bose wrote: >On Mon, Apr 07, 2014 at 09:20:50PM +0200, Lukas Slebodnik wrote: >> but there is no difference. You allocate debug_prg_name on NULL and then >> steal >> to another talloc context. (like in ldap_child) > >Why do you have to steal it? Just allocate on NULL and

Re: [SSSD] [PATCH] krb5_child: Fix use after free

2014-04-07 Thread Sumit Bose
On Mon, Apr 07, 2014 at 09:20:50PM +0200, Lukas Slebodnik wrote: > On (07/04/14 21:01), Sumit Bose wrote: > >On Mon, Apr 07, 2014 at 08:39:07PM +0200, Jakub Hrozek wrote: > >> On Mon, Apr 07, 2014 at 08:35:20PM +0200, Lukas Slebodnik wrote: > >> > On (07/04/14 20:30), Jakub Hrozek wrote: > >> > >On

Re: [SSSD] [PATCH] krb5_child: Fix use after free

2014-04-07 Thread Lukas Slebodnik
On (07/04/14 21:01), Sumit Bose wrote: >On Mon, Apr 07, 2014 at 08:39:07PM +0200, Jakub Hrozek wrote: >> On Mon, Apr 07, 2014 at 08:35:20PM +0200, Lukas Slebodnik wrote: >> > On (07/04/14 20:30), Jakub Hrozek wrote: >> > >On Mon, Apr 07, 2014 at 08:03:32PM +0200, Lukas Slebodnik wrote: >> > >> On (

Re: [SSSD] [PATCH] krb5_child: Fix use after free

2014-04-07 Thread Sumit Bose
On Mon, Apr 07, 2014 at 08:39:07PM +0200, Jakub Hrozek wrote: > On Mon, Apr 07, 2014 at 08:35:20PM +0200, Lukas Slebodnik wrote: > > On (07/04/14 20:30), Jakub Hrozek wrote: > > >On Mon, Apr 07, 2014 at 08:03:32PM +0200, Lukas Slebodnik wrote: > > >> On (07/04/14 18:53), Jakub Hrozek wrote: > > >>

Re: [SSSD] [PATCH] krb5_child: Fix use after free

2014-04-07 Thread Jakub Hrozek
On Mon, Apr 07, 2014 at 08:03:32PM +0200, Lukas Slebodnik wrote: > On (07/04/14 18:53), Jakub Hrozek wrote: > >On Fri, Apr 04, 2014 at 03:41:38PM +0200, Lukas Slebodnik wrote: > >> On (04/04/14 15:18), Jakub Hrozek wrote: > >> >On Thu, Apr 03, 2014 at 07:11:37PM +0200, Jakub Hrozek wrote: > >> >> O

Re: [SSSD] [PATCH] krb5_child: Fix use after free

2014-04-07 Thread Jakub Hrozek
On Mon, Apr 07, 2014 at 08:35:20PM +0200, Lukas Slebodnik wrote: > On (07/04/14 20:30), Jakub Hrozek wrote: > >On Mon, Apr 07, 2014 at 08:03:32PM +0200, Lukas Slebodnik wrote: > >> On (07/04/14 18:53), Jakub Hrozek wrote: > >> >On Fri, Apr 04, 2014 at 03:41:38PM +0200, Lukas Slebodnik wrote: > >> >

Re: [SSSD] [PATCH] krb5_child: Fix use after free

2014-04-07 Thread Lukas Slebodnik
On (07/04/14 20:30), Jakub Hrozek wrote: >On Mon, Apr 07, 2014 at 08:03:32PM +0200, Lukas Slebodnik wrote: >> On (07/04/14 18:53), Jakub Hrozek wrote: >> >On Fri, Apr 04, 2014 at 03:41:38PM +0200, Lukas Slebodnik wrote: >> >> On (04/04/14 15:18), Jakub Hrozek wrote: >> >> >On Thu, Apr 03, 2014 at 0

Re: [SSSD] [PATCH] krb5_child: Fix use after free

2014-04-07 Thread Lukas Slebodnik
On (07/04/14 18:53), Jakub Hrozek wrote: >On Fri, Apr 04, 2014 at 03:41:38PM +0200, Lukas Slebodnik wrote: >> On (04/04/14 15:18), Jakub Hrozek wrote: >> >On Thu, Apr 03, 2014 at 07:11:37PM +0200, Jakub Hrozek wrote: >> >> On Thu, Mar 20, 2014 at 05:53:31PM +0100, Lukas Slebodnik wrote: >> >> > On

Re: [SSSD] [PATCH] krb5_child: Fix use after free

2014-04-07 Thread Jakub Hrozek
On Fri, Apr 04, 2014 at 03:41:38PM +0200, Lukas Slebodnik wrote: > On (04/04/14 15:18), Jakub Hrozek wrote: > >On Thu, Apr 03, 2014 at 07:11:37PM +0200, Jakub Hrozek wrote: > >> On Thu, Mar 20, 2014 at 05:53:31PM +0100, Lukas Slebodnik wrote: > >> > On (20/03/14 17:21), Jakub Hrozek wrote: > >> > >

Re: [SSSD] [PATCH] krb5_child: Fix use after free

2014-04-04 Thread Lukas Slebodnik
On (04/04/14 15:18), Jakub Hrozek wrote: >On Thu, Apr 03, 2014 at 07:11:37PM +0200, Jakub Hrozek wrote: >> On Thu, Mar 20, 2014 at 05:53:31PM +0100, Lukas Slebodnik wrote: >> > On (20/03/14 17:21), Jakub Hrozek wrote: >> > >On Thu, Mar 20, 2014 at 05:00:00PM +0100, Sumit Bose wrote: >> > >> On Thu,

Re: [SSSD] [PATCH] krb5_child: Fix use after free

2014-04-04 Thread Jakub Hrozek
On Thu, Apr 03, 2014 at 07:11:37PM +0200, Jakub Hrozek wrote: > On Thu, Mar 20, 2014 at 05:53:31PM +0100, Lukas Slebodnik wrote: > > On (20/03/14 17:21), Jakub Hrozek wrote: > > >On Thu, Mar 20, 2014 at 05:00:00PM +0100, Sumit Bose wrote: > > >> On Thu, Mar 20, 2014 at 04:20:59PM +0100, Lukas Slebo

Re: [SSSD] [PATCH] krb5_child: Fix use after free

2014-04-03 Thread Jakub Hrozek
On Thu, Mar 20, 2014 at 05:53:31PM +0100, Lukas Slebodnik wrote: > On (20/03/14 17:21), Jakub Hrozek wrote: > >On Thu, Mar 20, 2014 at 05:00:00PM +0100, Sumit Bose wrote: > >> On Thu, Mar 20, 2014 at 04:20:59PM +0100, Lukas Slebodnik wrote: > >> > ehlo, > >> > > >> > debug_prg_name is used in debu

Re: [SSSD] [PATCH] krb5_child: Fix use after free

2014-03-20 Thread Lukas Slebodnik
On (20/03/14 17:21), Jakub Hrozek wrote: >On Thu, Mar 20, 2014 at 05:00:00PM +0100, Sumit Bose wrote: >> On Thu, Mar 20, 2014 at 04:20:59PM +0100, Lukas Slebodnik wrote: >> > ehlo, >> > >> > debug_prg_name is used in debug_fn and it was allocated under >> > talloc context "kr". The variable "kr" w

Re: [SSSD] [PATCH] krb5_child: Fix use after free

2014-03-20 Thread Jakub Hrozek
On Thu, Mar 20, 2014 at 05:00:00PM +0100, Sumit Bose wrote: > On Thu, Mar 20, 2014 at 04:20:59PM +0100, Lukas Slebodnik wrote: > > ehlo, > > > > debug_prg_name is used in debug_fn and it was allocated under > > talloc context "kr". The variable "kr" was removed before the last debug > > messages i

Re: [SSSD] [PATCH] krb5_child: Fix use after free

2014-03-20 Thread Sumit Bose
On Thu, Mar 20, 2014 at 04:20:59PM +0100, Lukas Slebodnik wrote: > ehlo, > > debug_prg_name is used in debug_fn and it was allocated under > talloc context "kr". The variable "kr" was removed before the last debug > messages in function main. It is very little change that it will be > overridden.

[SSSD] [PATCH] krb5_child: Fix use after free

2014-03-20 Thread Lukas Slebodnik
ehlo, debug_prg_name is used in debug_fn and it was allocated under talloc context "kr". The variable "kr" was removed before the last debug messages in function main. It is very little change that it will be overridden. It is possible to see this issue with exported environment variable TALLOC_F