From hyc@symas.com Thu Oct 29 02:07:53 2015 From: hyc@symas.com To: openldap-bugs@openldap.org Subject: Re: (ITS#8294) slappasswd can use SHA256 for hash but not SHA384 or SHA512...segfault Date: Thu, 29 Oct 2015 02:07:51 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7793415915602964943==" --===============7793415915602964943== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable ktmdms(a)gmail.com wrote: > --001a11c39c4eeea62d05232d4fc9 > Content-Type: text/plain; charset=3DUTF-8 > > adding the -fstack-protector-all option to the compile of the pw-sha2 on > the 3.18 machine and recompiling just the pw-sha2 appears to have fixed the > issue. Using -fstack-protector-all wasn't intended to fix the issue, it was intended= =20 to make the cause more visible. Instead it has hidden it. Needless to say,=20 that's not an acceptable resolution for us. > > Regards, > > Kevin Martin > > > > --- > > > Regards, > > Kevin Martin > > On Wed, Oct 28, 2015 at 9:58 AM, Howard Chu wrote: > >> Howard Chu wrote: >> >>> ktmdms(a)gmail.com wrote: >>> >>>> --089e0115ec1091312605232ac99f >>>> Content-Type: text/plain; charset=3DUTF-8 >>>> >>>> To add fuel to the fire, if I use pw-sha2 libraries that were built on a >>>> 2.6 kernel (specifically 2.6.32-358.el6.x86_64) on the 3.18 machine I can >>>> generate SHA512/384 hashed passwords with no issues. What should I be >>>> looking for between the two platforms that might cause the core? >>>> >>> >>> Strange that the kernel would make any difference - more likely it's your >>> C >>> compiler making the difference. >>> >> >> I may have misread your message. If the same binary works on a newer >> system, that tends to imply something weird in the runtime environment. >> Perhaps a problem with ASLR. >> >> >> I ran a test on one machine and got an abort in glibc saying there was a >>> stack >>> overrun. On a different machine I got no such error, and running on the >>> problem system under valgrind produced no errors. >>> >>> On the machine that aborted, when I compiled with gcc >>> -fstack-protector-all, >>> the glibc abort disappeared as well. So, this hasn't helped me identify >>> the >>> problem yet. (gcc 4.8.4-2ubuntu1~14.04) >>> >>> >> >> -- >> -- Howard Chu >> CTO, Symas Corp. http://www.symas.com >> Director, Highland Sun http://highlandsun.com/hyc/ >> Chief Architect, OpenLDAP http://www.openldap.org/project/ >> > > --001a11c39c4eeea62d05232d4fc9 > Content-Type: text/html; charset=3DUTF-8 > Content-Transfer-Encoding: quoted-printable > >
adding the -fstack-protector-all option to the compile o= f =3D > the pw-sha2 on the 3.18 machine and recompiling just the pw-sha2 appears to= =3D > have fixed the issue.

Regards,

> Kevin Martin


ail_extra">
=3D3D"ltr">---

an style=3D3D"font-size:12.8px">
e:12.8px">Regards,

Kevin Martin
<= =3D > /div>
>
On Wed, Oct 28, 2015 at 9:58 AM, Howard Ch= u =3D > <hy=3D > c(a)symas.com> wrote:
e=3D3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> lass=3D3D"">Howard Chu wrote:
>
x #ccc solid;padding-left:1ex"> > ktmdms(a)gmail.= com =3D > wrote:
>
x #ccc solid;padding-left:1ex"> > --089e0115ec1091312605232ac99f
> Content-Type: text/plain; charset=3D3DUTF-8
>
> To add fuel to the fire, if I use pw-sha2 libraries that were built on a> > 2.6 kernel (specifically 2.6.32-358.el6.x86_64) on the 3.18 machine I can r> > generate SHA512/384 hashed passwords with no issues.=3DC2=3DA0 What should = I be=3D >
> looking for between the two platforms that might cause the core?
>
>
> Strange that the kernel would make any difference - more likely it's yo= =3D > ur C
> compiler making the difference.
>
>
> I may have misread your message. If the same binary works on a newer system= =3D > , that tends to imply something weird in the runtime environment. Perhaps a= =3D > problem with ASLR.

>
>
x #ccc solid;padding-left:1ex"> > I ran a test on one machine and got an abort in glibc saying there was a st= =3D > ack
> overrun. On a different machine I got no such error, and running on the
> problem system under valgrind produced no errors.
>
> On the machine that aborted, when I compiled with gcc -fstack-protector-all= =3D > ,
> the glibc abort disappeared as well. So, this hasn't helped me identify= =3D > the
> problem yet. (gcc 4.8.4-2ubuntu1~14.04)
>
>
>
>
> --
> =3DC2=3DA0 -- Howard Chu
> =3DC2=3DA0 CTO, Symas Corp.=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC= 2=3DA0 =3DC2=3DA0 http://www.symas.com" rel=3D3D"noreferrer" target=3D3D"_blank">http://www.s= ymas=3D > .com
> =3DC2=3DA0 Director, Highland Sun=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 sun.com/hyc/" rel=3D3D"noreferrer" target=3D3D"_blank">http://highlandsun.c= om/h=3D > yc/
> =3DC2=3DA0 Chief Architect, OpenLDAP=3DC2=3DA0 roject/" rel=3D3D"noreferrer" target=3D3D"_blank">http://www.openldap.org/p= roje=3D > ct/
>

> > --001a11c39c4eeea62d05232d4fc9-- > > > > --=20 -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/ --===============7793415915602964943==--