<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: core dump using pam authentication in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108052#M92908</link>
    <description>My system has trusted mode enabled.&lt;BR /&gt;Pam is actually use to authenticate OS user only.&lt;BR /&gt;&lt;BR /&gt;I think the pam configuration is ok because the system work for a while before crashing. Java patch and PAM patches are OK (at least I think).&lt;BR /&gt;&lt;BR /&gt;I forgot to say that I'm running my code on hp 11.23 v2 on IA64. The code is 64 bit.&lt;BR /&gt;</description>
    <pubDate>Tue, 27 Nov 2007 08:06:07 GMT</pubDate>
    <dc:creator>Marco Salvi</dc:creator>
    <dc:date>2007-11-27T08:06:07Z</dc:date>
    <item>
      <title>core dump using pam authentication</title>
      <link>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108049#M92905</link>
      <description>Hi,&lt;BR /&gt;I'm experiencing a core dump in a java application using JNI to call the pam module to authenticate a user.&lt;BR /&gt;Scanning the core I've noticed that the memory corruption is caused by the following string.&lt;BR /&gt;&lt;BR /&gt;"word: "&lt;BR /&gt;&lt;BR /&gt;I was able to find this word in the messages received by my conversation function. This word should be a substring of&lt;BR /&gt;&lt;BR /&gt;"Password: "&lt;BR /&gt;&lt;BR /&gt;I've tried to apply the latest patches available for pam but that does not fix the problem.&lt;BR /&gt;&lt;BR /&gt;I read that pam call are not thread safe.&lt;BR /&gt;In my application there is a synchronize statement in the java code that contain the code for all the pam call, so it is not possible to have two pam calls executed at the same time in different threads.&lt;BR /&gt;&lt;BR /&gt;Some chunck of code for giving you a better idea&lt;BR /&gt;&lt;BR /&gt;java code&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;  synchronized( PamUnixRegistryImpl.class )&lt;BR /&gt;  {&lt;BR /&gt;            if (pam_authenticate(s, s1) == 0) {&lt;BR /&gt;                PasswordCheckFailedException passwordcheckfailedexception =&lt;BR /&gt;                    new PasswordCheckFailedException("Pam Authentication failed for user: " + s);&lt;BR /&gt;                throw passwordcheckfailedexception;&lt;BR /&gt;            }&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;JNI code&lt;BR /&gt;&lt;BR /&gt;pam_authenticate simply call&lt;BR /&gt;&lt;BR /&gt;PamUnixRegistryImpl_checkPassword (...&lt;BR /&gt;&lt;BR /&gt;C code&lt;BR /&gt;&lt;BR /&gt;....&lt;BR /&gt;&lt;BR /&gt;extern int convert(int num_msg,struct pam_message **msg,struct&lt;BR /&gt;pam_response **resp,void *appdata_ptr)&lt;BR /&gt;{&lt;BR /&gt; // Initialize PAM response object and set password&lt;BR /&gt; struct pam_response *temp;&lt;BR /&gt; temp = (struct pam_response *)calloc(num_msg,sizeof(struct pam_response));&lt;BR /&gt; temp[0].resp_retcode = 0;&lt;BR /&gt; temp[0].resp = strdup((const char*)appdata_ptr);&lt;BR /&gt; *resp = temp; &lt;BR /&gt; return PAM_SUCCESS;&lt;BR /&gt;}&lt;BR /&gt;static struct pam_conv conv = {convert,NULL};&lt;BR /&gt;&lt;BR /&gt;int PamUnixRegistryImpl_checkPassword (const char *username,const char *password)&lt;BR /&gt;{&lt;BR /&gt; pwd_buf_t buf;&lt;BR /&gt;    const char *epass;&lt;BR /&gt;    struct passwd *pwd;&lt;BR /&gt;    long last_update, max_age, min_age;&lt;BR /&gt;    time_t now;&lt;BR /&gt; int local_user;&lt;BR /&gt; pam_handle_t *pamh=NULL;&lt;BR /&gt; int retval;&lt;BR /&gt; struct pam_response *pp=NULL;&lt;BR /&gt; conv.appdata_ptr = password;&lt;BR /&gt; local_user = 0;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; // initialize PAM&lt;BR /&gt; printf("pam_checkPassword\n");&lt;BR /&gt; fflush(stdout);&lt;BR /&gt; &lt;BR /&gt; retval = pam_start("checkpassword", username, &amp;amp;conv, &amp;amp;pamh);&lt;BR /&gt;  &lt;BR /&gt; &lt;BR /&gt; if (retval == PAM_SUCCESS)&lt;BR /&gt; {   &lt;BR /&gt;     retval = pam_authenticate(pamh, PAM_SILENT);&lt;BR /&gt;     printf("pam_authenticate\n");&lt;BR /&gt;     fflush(stdout);&lt;BR /&gt;                 if (retval != PAM_SUCCESS) &lt;BR /&gt;   {&lt;BR /&gt;                      pam_end(pamh,retval);&lt;BR /&gt;         pamh = NULL;         &lt;BR /&gt;        return 0;&lt;BR /&gt;   }&lt;BR /&gt;   // End PAM Session&lt;BR /&gt;    if (pam_end(pamh,retval) != PAM_SUCCESS)&lt;BR /&gt;   {&lt;BR /&gt;    pamh = NULL;              &lt;BR /&gt;            return 0;&lt;BR /&gt;           }&lt;BR /&gt;}&lt;BR /&gt;else &lt;BR /&gt;{&lt;BR /&gt;  try a local authentication without PAM&lt;BR /&gt;}&lt;BR /&gt;return 1; &lt;BR /&gt;...&lt;BR /&gt;</description>
      <pubDate>Tue, 27 Nov 2007 06:42:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108049#M92905</guid>
      <dc:creator>Marco Salvi</dc:creator>
      <dc:date>2007-11-27T06:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: core dump using pam authentication</title>
      <link>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108050#M92906</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If you want your code debugged, move to the next response because I don't understand your code.&lt;BR /&gt;&lt;BR /&gt;I'd take some time to investigate your /etc/pam.d/ authentication. Make sure PAM is up to date and the system has a recent bi-annual patch.&lt;BR /&gt;&lt;BR /&gt;I'd also make sure Java itself is updated to a recent, stable release.&lt;BR /&gt;&lt;BR /&gt;Any of these factors can cause problems. I'd also be interested to know which pam authentication module your code intends to use to authenticate. Your system may need changes to /etc/nsswitch.conf to accommodate this.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Tue, 27 Nov 2007 07:22:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108050#M92906</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2007-11-27T07:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: core dump using pam authentication</title>
      <link>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108051#M92907</link>
      <description>My system has trusted mode enabled.&lt;BR /&gt;&lt;BR /&gt;I think the pam configuration is ok because the system work for a while before crashing. Java patch and PAM patches are OK (at least I think).&lt;BR /&gt;&lt;BR /&gt;I forgot to say that I'm running my code on hp 11.23 v2 on IA64. The code is 64 bit.&lt;BR /&gt;</description>
      <pubDate>Tue, 27 Nov 2007 08:06:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108051#M92907</guid>
      <dc:creator>Marco Salvi</dc:creator>
      <dc:date>2007-11-27T08:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: core dump using pam authentication</title>
      <link>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108052#M92908</link>
      <description>My system has trusted mode enabled.&lt;BR /&gt;Pam is actually use to authenticate OS user only.&lt;BR /&gt;&lt;BR /&gt;I think the pam configuration is ok because the system work for a while before crashing. Java patch and PAM patches are OK (at least I think).&lt;BR /&gt;&lt;BR /&gt;I forgot to say that I'm running my code on hp 11.23 v2 on IA64. The code is 64 bit.&lt;BR /&gt;</description>
      <pubDate>Tue, 27 Nov 2007 08:06:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108052#M92908</guid>
      <dc:creator>Marco Salvi</dc:creator>
      <dc:date>2007-11-27T08:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: core dump using pam authentication</title>
      <link>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108053#M92909</link>
      <description>&amp;gt;I'm experiencing a core dump in a java application using JNI to call the pam module to authenticate a user.&lt;BR /&gt;&lt;BR /&gt;Do you have a stack trace that points to the line in your source above?&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Scanning the core I've noticed that the memory corruption is caused by the following string.  "word: "&lt;BR /&gt;&amp;gt;I was able to find this word in the messages received by my conversation function.&lt;BR /&gt;&lt;BR /&gt;What do you mean by scanning?  You must debug the problem and print out variables.</description>
      <pubDate>Tue, 27 Nov 2007 11:10:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108053#M92909</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-11-27T11:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: core dump using pam authentication</title>
      <link>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108054#M92910</link>
      <description>#0  0xc00000000490b670:0 in real_malloc+0x670 () from /usr/lib/hpux64/libc.so.1&lt;BR /&gt;#1  0xc00000000490ae10:0 in _malloc+0x7d0 () from /usr/lib/hpux64/libc.so.1&lt;BR /&gt;#2  0xc000000004915fb0:0 in malloc+0x140 () from /usr/lib/hpux64/libc.so.1&lt;BR /&gt;#3  0x9fffffffbf0b1770:0 in nnfun2a+0x310 ()&lt;BR /&gt;   from /home/oracle/ora10g/lib/libclntsh.so.10.1&lt;BR /&gt;#4  0x9fffffffbf0b0ec0:0 in nnfsn2a+0x80 ()&lt;BR /&gt;   from /home/oracle/ora10g/lib/libclntsh.so.10.1&lt;BR /&gt;#5  0x9fffffffbf0820b0:0 in niqname+0x350 ()&lt;BR /&gt;   from /home/oracle/ora10g/lib/libclntsh.so.10.1&lt;BR /&gt;#6  0x9fffffffbeeb9c40:0 in kwfnran+0x220 ()&lt;BR /&gt;   from /home/oracle/ora10g/lib/libclntsh.so.10.1&lt;BR /&gt;#7  0x9fffffffbee549f0:0 in kwfcinit+0x210 ()&lt;BR /&gt;   from /home/oracle/ora10g/lib/libclntsh.so.10.1&lt;BR /&gt;#8  0x9fffffffc0372440 in &lt;UNKNOWN_PROCEDURE&gt; + 0xef0 ()&lt;BR /&gt;   from /home/oracle/ora10g/lib/libclntsh.so.10.1&lt;BR /&gt;#9  0x9fffffffbec5ec40:0 in OCIServerAttach+0xe0 ()&lt;BR /&gt;   from /home/oracle/ora10g/lib/libclntsh.so.10.1&lt;BR /&gt;&lt;BR /&gt;this is the top of the stack trace&lt;BR /&gt;&lt;BR /&gt;disassembling the part that fails I have noticed &lt;BR /&gt;&lt;BR /&gt;0xc00000000490b660:0 &lt;REAL_MALLOC&gt;:&lt;BR /&gt;    (p6)  ld8              r32=[r18]&lt;BR /&gt;0xc00000000490b660:1 &lt;REAL_MALLOC&gt;:&lt;BR /&gt;          adds             r19=-1,r23&lt;BR /&gt;0xc00000000490b660:2 &lt;REAL_MALLOC&gt;:&lt;BR /&gt;          add              r8=r10,r14&lt;BR /&gt;0xc00000000490b670:0 &lt;REAL_MALLOC&gt;:&lt;BR /&gt;    (p7)  ld8.a            r16=[r32]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;(gdb) x $r32&lt;BR /&gt;0x776f72643a200000:     Error accessing memory address 0x776f72643a200000: Bad address.&lt;BR /&gt;&lt;BR /&gt;(gdb) x/x $r18&lt;BR /&gt;0x6000000000286398:     0x600000000284b338&lt;BR /&gt;(gdb) x/16gx $r18 -32&lt;BR /&gt;0x6000000000286378:     0x0000000100000000      0x0000000000000120&lt;BR /&gt;0x6000000000286388:     0x776f72643a200000      0x0000000000000000&lt;BR /&gt;0x6000000000286398:     0x600000000284b338      0x0000000000000062&lt;BR /&gt;0x60000000002863a8:     0x0000000000000064      0x0000000100000000&lt;BR /&gt;0x60000000002863b8:     0x0000000000000130      0x6000000002f00018&lt;BR /&gt;0x60000000002863c8:     0x0000000000000002      0x6000000002f00278&lt;BR /&gt;0x60000000002863d8:     0x0000000000000062      0x0000000000000064&lt;BR /&gt;0x60000000002863e8:     0x0000000100000000      0x0000000000000140&lt;BR /&gt;(gdb) x/16gs $r18 -32&lt;BR /&gt;0x6000000000286378:      ""&lt;BR /&gt;0x6000000000286379:      ""&lt;BR /&gt;0x600000000028637a:      ""&lt;BR /&gt;0x600000000028637b:      "\001"&lt;BR /&gt;0x600000000028637d:      ""&lt;BR /&gt;0x600000000028637e:      ""&lt;BR /&gt;0x600000000028637f:      ""&lt;BR /&gt;0x6000000000286380:      ""&lt;BR /&gt;0x6000000000286381:      ""&lt;BR /&gt;0x6000000000286382:      ""&lt;BR /&gt;0x6000000000286383:      ""&lt;BR /&gt;0x6000000000286384:      ""&lt;BR /&gt;0x6000000000286385:      ""&lt;BR /&gt;0x6000000000286386:      "\001 word: "&lt;BR /&gt;0x600000000028638f:      ""&lt;BR /&gt;0x6000000000286390:      ""&lt;BR /&gt;&lt;BR /&gt;It seems that the memory has been corrupted by a string&lt;BR /&gt;&lt;BR /&gt;I believe that this is part of "Password: "&lt;BR /&gt;&lt;BR /&gt;So I think that the memory has been corrupted by the function pam_authenticate that pass the structure&lt;BR /&gt;&lt;BR /&gt;struct pam_message **msg&lt;BR /&gt;&lt;BR /&gt;to my conversation function&lt;BR /&gt;&lt;BR /&gt;and the value of&lt;BR /&gt;&lt;BR /&gt;msg[0]-&amp;gt;msg is "Password: "&lt;BR /&gt;&lt;BR /&gt;Do you agree with my analysis?&lt;BR /&gt;&lt;/REAL_MALLOC&gt;&lt;/REAL_MALLOC&gt;&lt;/REAL_MALLOC&gt;&lt;/REAL_MALLOC&gt;&lt;/UNKNOWN_PROCEDURE&gt;</description>
      <pubDate>Tue, 27 Nov 2007 11:36:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108054#M92910</guid>
      <dc:creator>Marco Salvi</dc:creator>
      <dc:date>2007-11-27T11:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: core dump using pam authentication</title>
      <link>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108055#M92911</link>
      <description>&amp;gt;#0 0xc00000000490b670:0 in real_malloc+0x670 libc.so.1&lt;BR /&gt;&lt;BR /&gt;Wow!  Someone that knows how to debug!&lt;BR /&gt;&lt;BR /&gt;&amp;gt;It seems that the memory has been corrupted by a string&lt;BR /&gt;&lt;BR /&gt;Exactly.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;So I think that the memory has been corrupted by the function pam_authenticate that pass the structure struct pam_message **msg to my convert function&lt;BR /&gt;&lt;BR /&gt;Possibly.  But your calloc for resp looks ok, provided num_msg isn't 0.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;and the value of msg[0]-&amp;gt;msg is "Password: "&lt;BR /&gt;&lt;BR /&gt;I don't see you using msg?  Were you suppose to set it?&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Do you agree with my analysis?&lt;BR /&gt;&lt;BR /&gt;Partly.  You should put a hardware watchpoint on 0x6000000000286388 to see who is modifying it:&lt;BR /&gt;(gdb) watch *(void**)0x6000000000286388</description>
      <pubDate>Tue, 27 Nov 2007 12:02:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108055#M92911</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-11-27T12:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: core dump using pam authentication</title>
      <link>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108056#M92912</link>
      <description>Thanks for your suggestion.&lt;BR /&gt;I have tried this but unfortunately the corruption happens after some time. I spend an half an hour pressing enter then the debugger get in stuck.&lt;BR /&gt;There is a way to set the watchpoint and tell the debugger to ignore malloc and free for that address?&lt;BR /&gt;</description>
      <pubDate>Tue, 27 Nov 2007 12:58:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108056#M92912</guid>
      <dc:creator>Marco Salvi</dc:creator>
      <dc:date>2007-11-27T12:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: core dump using pam authentication</title>
      <link>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108057#M92913</link>
      <description>&amp;gt;I have tried this but unfortunately the corruption happens after some time. I spend an half an hour pressing enter then the debugger get in stuck.&lt;BR /&gt;&lt;BR /&gt;Then you may have problems.  Especially if java allocates a different address.  Is the corruption address the same in two runs?&lt;BR /&gt;&lt;BR /&gt;&amp;gt;There is a way to set the watchpoint and tell the debugger to ignore malloc and free for that address?&lt;BR /&gt;&lt;BR /&gt;You could add a condition to the watch point to only stop if the value 0x776f72643a200000 is stored:&lt;BR /&gt;cond watch-number (*(void**)0x6000000000286388 == 0x776f72643a200000)</description>
      <pubDate>Tue, 27 Nov 2007 17:18:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108057#M92913</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-11-27T17:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: core dump using pam authentication</title>
      <link>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108058#M92914</link>
      <description>Hi Dennis,&lt;BR /&gt;the address seems to be the same.&lt;BR /&gt;There is a way to run the check outside the debugger?&lt;BR /&gt;</description>
      <pubDate>Thu, 29 Nov 2007 09:11:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108058#M92914</guid>
      <dc:creator>Marco Salvi</dc:creator>
      <dc:date>2007-11-29T09:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: core dump using pam authentication</title>
      <link>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108059#M92915</link>
      <description>&amp;gt;the address seems to be the same.&lt;BR /&gt;&lt;BR /&gt;That's good.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;There is a way to run the check outside the debugger?&lt;BR /&gt;&lt;BR /&gt;Where would this be?  In your application?&lt;BR /&gt;Since you know the address you could add statements that did the checking:&lt;BR /&gt;if (*(void**)0x6000000000286388L == (void*)0x776f72643a200000L)&lt;BR /&gt;&lt;BR /&gt;If you think the address may change, you could initialize a variable and if not correct, use gdb to change it:&lt;BR /&gt;void *gdb_watch = (void*)0x6000000000286388L;&lt;BR /&gt;&lt;BR /&gt;Unfortunately, you would have to make sure that the address 0x6000000000286388 was valid before you dereferenced it.  Possibly by doing:&lt;BR /&gt;if (sbrk(0) &amp;gt; gdb_watch &amp;amp;&amp;amp; *(void**)gdb_watch == (void*)0x776f72643a200000L)&lt;BR /&gt;&lt;BR /&gt;If you are trying to debug heap corruption, have you looked into gdb's:&lt;BR /&gt;set heap-check on string on</description>
      <pubDate>Thu, 29 Nov 2007 19:34:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108059#M92915</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-11-29T19:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: core dump using pam authentication</title>
      <link>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108060#M92916</link>
      <description>Dennis, the addres is not so constant.&lt;BR /&gt;&lt;BR /&gt;I tried this that seemed able to help me&lt;BR /&gt;&lt;BR /&gt;export these variables&lt;BR /&gt;&lt;BR /&gt;BATCH_RTC=on&lt;BR /&gt;&lt;BR /&gt;LD_PRELOAD=/opt/langtools/lib/hpux64/librtc.sl&lt;BR /&gt;&lt;BR /&gt;crete a rtcconfig file&lt;BR /&gt;&lt;BR /&gt;and run my program.&lt;BR /&gt;&lt;BR /&gt;If a kill it in the middle a report about memory is generated, but if I wait until the program crash by itself I get this message&lt;BR /&gt;&lt;BR /&gt;# [ timer expired, abort... ]&lt;BR /&gt;</description>
      <pubDate>Fri, 30 Nov 2007 06:46:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108060#M92916</guid>
      <dc:creator>Marco Salvi</dc:creator>
      <dc:date>2007-11-30T06:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: core dump using pam authentication</title>
      <link>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108061#M92917</link>
      <description>&amp;gt;the address is not so constant.&lt;BR /&gt;&lt;BR /&gt;Then watch points won't help.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;I tried this that seemed able to help me ... BATCH_RTC=on&lt;BR /&gt;&lt;BR /&gt;Any reason you couldn't use gdb and set heap-check directly?&lt;BR /&gt;Also what version of wdb do you have?  Have you downloaded the latest, 5.7?&lt;BR /&gt;&lt;A href="http://www.hp.com/go/wdb" target="_blank"&gt;http://www.hp.com/go/wdb&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;but if I wait until the program crash by itself I get this message&lt;BR /&gt;# [ timer expired, abort... ]&lt;BR /&gt;&lt;BR /&gt;If it crashes before it prints an error, then that won't help.&lt;BR /&gt;&lt;BR /&gt;For the "timer" message, you may have contact wdb-help@cup.hp.com.&lt;BR /&gt;(See the "HP WDB technical support" link.)</description>
      <pubDate>Fri, 30 Nov 2007 15:18:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108061#M92917</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-11-30T15:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: core dump using pam authentication</title>
      <link>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108062#M92918</link>
      <description>&amp;gt;So I think that the memory has been corrupted by the function pam_authenticate that pass the structure: struct pam_message **msg&lt;BR /&gt;&amp;gt;and the value of: msg[0]-&amp;gt;msg is "Password: "&lt;BR /&gt;&lt;BR /&gt;You might want to print the values of msg, msg[0] .. msg[0]+num_msg-1 and then msg[0][i].msg.&lt;BR /&gt;Also the value num_msg.&lt;BR /&gt;If these are close to your corrupted heap address, that may be a clue.&lt;BR /&gt;&lt;BR /&gt;There seems to be a data structure inconsistency between struct pam_message **msg and struct pam_response **resp.&lt;BR /&gt;&lt;BR /&gt;The second seems to be a pointer to an array of pam_response.  The first seems to be a pointer to an array of pointers to pam_message.  I.e. for msg, there is no reason for a ** if all you want to do is read and not change them.&lt;BR /&gt;&lt;BR /&gt;Ok, I was confused by your syntax.  From pam_start(3) you need to use this to index through each msg:&lt;BR /&gt;msg[0][i].msg&lt;BR /&gt;&lt;BR /&gt;BTW: pam_start(3) says that msg should be:&lt;BR /&gt;const struct pam_message **msg</description>
      <pubDate>Fri, 30 Nov 2007 16:05:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108062#M92918</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-11-30T16:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: core dump using pam authentication</title>
      <link>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108063#M92919</link>
      <description>last time (4 years ago) I saw this errors It workt to unconvert the system (after that the script was working.) &lt;BR /&gt;&lt;BR /&gt;after converting again the script kept working, never knowed why but reading this lines it makes sens sind's you are telling it is a mem problem, make the system untrusted and trusted again removes the pam from memory....&lt;BR /&gt;&lt;BR /&gt;if you are able to do this please try.&lt;BR /&gt;&lt;BR /&gt;ps be aware that it you have max passwd lenkt on 8 caracters that after unconverting a user that is thinking he is using 9 caracters can not log in anny more :)</description>
      <pubDate>Fri, 30 Nov 2007 16:45:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108063#M92919</guid>
      <dc:creator>F Verschuren</dc:creator>
      <dc:date>2007-11-30T16:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: core dump using pam authentication</title>
      <link>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108064#M92920</link>
      <description>Hi,&lt;BR /&gt;I tried to work also disabling the trusted mode but the error is still there.&lt;BR /&gt;</description>
      <pubDate>Sat, 01 Dec 2007 07:35:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108064#M92920</guid>
      <dc:creator>Marco Salvi</dc:creator>
      <dc:date>2007-12-01T07:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: core dump using pam authentication</title>
      <link>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108065#M92921</link>
      <description>Unfortunately not yet able to fix this problem. Just one more question.&lt;BR /&gt;&lt;BR /&gt;Could this problem be due to a stack overflow?&lt;BR /&gt;&lt;BR /&gt;Actually the string "Password :" is stored in a location in the stack, but I have the chunk " word:" in the heap.&lt;BR /&gt;&lt;BR /&gt;I'm not really into the memory model of HP Itanium so I apologize in case it is a very stupid question.</description>
      <pubDate>Thu, 06 Dec 2007 15:51:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108065#M92921</guid>
      <dc:creator>Marco Salvi</dc:creator>
      <dc:date>2007-12-06T15:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: core dump using pam authentication</title>
      <link>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108066#M92922</link>
      <description>&amp;gt;Could this problem be due to a stack overflow?&lt;BR /&gt;&lt;BR /&gt;That's a good question because a signal 11 can occur just about anywhere.&lt;BR /&gt;&lt;BR /&gt;But in this case, the address is a load and $r32 is a bogus address, ascii string.</description>
      <pubDate>Fri, 07 Dec 2007 05:47:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108066#M92922</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-12-07T05:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: core dump using pam authentication</title>
      <link>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108067#M92923</link>
      <description>Hi Dennis,&lt;BR /&gt;I've been able to run my program for a while whit check-heap and check-heap string.&lt;BR /&gt;&lt;BR /&gt;(gdb) cont&lt;BR /&gt;Continuing.&lt;BR /&gt;[Switching to thread 60 (system thread 8729618)]&lt;BR /&gt;warning: Memory block (size = 260 address = 0x6000000001fc0630) appears to be corrupted at the end.&lt;BR /&gt;Allocation context not found&lt;BR /&gt;&lt;BR /&gt;#1  pam_sm_authenticate() from /usr/lib/security/hpux64/libpam_unix.so.1&lt;BR /&gt;#2  pam_authenticate() from /usr/lib/hpux64/libpam.so.1&lt;BR /&gt;#3  PamUnixRegistryImpl_checkPassword() from /home/tws83/appserver/lib/ext/libtwspamjni.so&lt;BR /&gt;#4  Java_com_ibm_tws_pam_security_registry_PamUnixRegistryImpl_pam_1authenticate() from /home/tws83/appserver/lib/ext/libtwspamjni.so&lt;BR /&gt;warning: Use command backtrace (bt) to see the current context.&lt;BR /&gt;&lt;BR /&gt;Ignore top 4 frames belonging to leak detection library of gdb.&lt;BR /&gt;&lt;BR /&gt;__rtc_event () at ../../../Src/gnu/gdb/infrtc.c:1329&lt;BR /&gt;1329    in ../../../Src/gnu/gdb/infrtc.c&lt;BR /&gt;(gdb) x/16gx 0x6000000001fc0630 -16&lt;BR /&gt;0x6000000001fc0620:     0xfeedfacefeedface      0xfeedfacefeedface&lt;BR /&gt;0x6000000001fc0630:     0x000000019fffffff      0xd94013709fffffff&lt;BR /&gt;0x6000000001fc0640:     0xd94013709fffffff      0xd94013789fffffff&lt;BR /&gt;0x6000000001fc0650:     0xd94013789fffffff      0xd94013809fffffff&lt;BR /&gt;0x6000000001fc0660:     0xd94013809fffffff      0xd94013889fffffff&lt;BR /&gt;0x6000000001fc0670:     0xd94013889fffffff      0xd94013909fffffff&lt;BR /&gt;0x6000000001fc0680:     0xd94013909fffffff      0xd95008409fffffff&lt;BR /&gt;0x6000000001fc0690:     0xd95008409fffffff      0xd95008509fffffff&lt;BR /&gt;(gdb)&lt;BR /&gt;0x6000000001fc06a0:     0xd95008509fffffff      0xd95008609fffffff&lt;BR /&gt;0x6000000001fc06b0:     0xd95008609fffffff      0xd95008709fffffff&lt;BR /&gt;0x6000000001fc06c0:     0xd95008709fffffff      0xd95008809fffffff&lt;BR /&gt;0x6000000001fc06d0:     0xd95008809fffffff      0xd95008909fffffff&lt;BR /&gt;0x6000000001fc06e0:     0xd95008909fffffff      0xd95008a09fffffff&lt;BR /&gt;0x6000000001fc06f0:     0xd95008a09fffffff      0xd95008b09fffffff&lt;BR /&gt;0x6000000001fc0700:     0xd95008b09fffffff      0xd9400fb89fffffff&lt;BR /&gt;0x6000000001fc0710:     0xd9400fb89fffffff      0xd9400fc09fffffff&lt;BR /&gt;(gdb)&lt;BR /&gt;0x6000000001fc0720:     0xd9400fc09fffffff      0xd9400fc89fffffff&lt;BR /&gt;&amp;gt;&amp;gt;0x6000000001fc0730:     0xd9400fc850617373      0x776f72643a200020&lt;BR /&gt;0x6000000001fc0740:     0x6000000001fc1170      0x6000000001fc0a90&lt;BR /&gt;0x6000000001fc0750:     0x6000000001fc06d0      0x0000000000000000&lt;BR /&gt;0x6000000001fc0760:     0x6000000001fc1ee0      0x0000000000000000&lt;BR /&gt;0x6000000001fc0770:     0x6000000001aa8450      0x000000160000004b&lt;BR /&gt;0x6000000001fc0780:     0x6000000001fc0720      0x6000000001fc0770&lt;BR /&gt;0x6000000001fc0790:     0x6000000001fc0a90      0x6000000001fc0a90&lt;BR /&gt;&lt;BR /&gt;The line with the leading &amp;gt;&amp;gt; seem to be corrupted by the string "Password: ".&lt;BR /&gt;&lt;BR /&gt;There any way I can watch all the read/write on that kind of allocation?&lt;BR /&gt;&lt;BR /&gt;It seems some dynamic structure allocated in pam_sm_authenticate but I don't have access to this code so it is not really simple to debug</description>
      <pubDate>Fri, 07 Dec 2007 13:46:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108067#M92923</guid>
      <dc:creator>Marco Salvi</dc:creator>
      <dc:date>2007-12-07T13:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: core dump using pam authentication</title>
      <link>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108068#M92924</link>
      <description>&amp;gt;I've been able to run my program for a while with check-heap and check-heap string.&lt;BR /&gt;&lt;BR /&gt;I would expect it to be blasted by a string operation.  Of course that could be inlined and not show up.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;warning: Memory block (size = 260 address = 0x6000000001fc0630) appears to be corrupted at the end.&lt;BR /&gt;&lt;BR /&gt;Yes.  But it seems the whole block is bogus since there seems to be a 8 byte pattern that is half there, and missing 9fffffff.  (Unless the pointers have been shifted down 4 bytes: 9fffffffd9401370)&lt;BR /&gt;&lt;BR /&gt;&amp;gt;The line with the leading &amp;gt;&amp;gt; seem to be corrupted by the string "Password: ".&lt;BR /&gt;&lt;BR /&gt;Yes.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; There any way I can watch all the read/write on that kind of allocation? &lt;BR /&gt;&lt;BR /&gt;If you use "help set heap-check" there is something about monitoring addresses but if the address isn't the same, you'll have problems.  Otherwise if it is the same address you can put a watchpoint on it.&lt;BR /&gt;&lt;BR /&gt;Who printed this poor stack trace?  Where are the hex addresses and function offsets?&lt;BR /&gt;#1 pam_sm_authenticate() .../libpam_unix.so.1&lt;BR /&gt;#2 pam_authenticate()  .../libpam.so.1&lt;BR /&gt;#3 PamUnixRegistryImpl_checkPassword()  .../libtwspamjni.so &lt;BR /&gt;&lt;BR /&gt;Can you get a better one with "bt"?&lt;BR /&gt;&lt;BR /&gt;You might want to disassembly around pam_sm_authenticate so you can figure out was the last call made.  (Does #0 exist?)&lt;BR /&gt;&lt;BR /&gt;If it was strcpy/memcpy that may be the one that moved "Password".  If free, the corruption was made sooner.</description>
      <pubDate>Sun, 09 Dec 2007 00:31:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/core-dump-using-pam-authentication/m-p/4108068#M92924</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-12-09T00:31:55Z</dc:date>
    </item>
  </channel>
</rss>

