<?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>i.MX ProcessorsのトピックRe: CST HSM - Segmentation fault (core dumped)</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/CST-HSM-Segmentation-fault-core-dumped/m-p/966348#M143977</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did the same. But this doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does it have anything to do with version of openssl ? I am using the openssl 1.1.1 with Ubuntu18.04&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Nov 2019 11:54:58 GMT</pubDate>
    <dc:creator>sudhakervincent</dc:creator>
    <dc:date>2019-11-11T11:54:58Z</dc:date>
    <item>
      <title>CST HSM - Segmentation fault (core dumped)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/CST-HSM-Segmentation-fault-core-dumped/m-p/966345#M143974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have implemented solution to sign the u-boot and zImage with CST tool. Now I would like to implement CST tool to work with HSM module. I already have PKI tree generated on the HSM. I created the CST tool with back_end-hsm, create hsm.cfg file with path to the certificate and run CST tool. After a moment I get error Segmentation fault (core dumped). With cst tool located in /linux64/bin/cst there is no problem to sign the image, but with back_end-hsm I get segmentation fault. (CST 3.1.0 and also with CST 3.2.0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT:&lt;/P&gt;&lt;P&gt;I am using module libsc-hsm-pkcs11.so, error is on the line 589 (ENGINE_ctrl_cmd_string (eng, "MODULE_PATH", hsm_conf.module_path, 0);)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for any idea.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Tomas Klein&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Sep 2019 13:32:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/CST-HSM-Segmentation-fault-core-dumped/m-p/966345#M143974</guid>
      <dc:creator>tomasklein</dc:creator>
      <dc:date>2019-09-09T13:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: CST HSM - Segmentation fault (core dumped)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/CST-HSM-Segmentation-fault-core-dumped/m-p/966346#M143975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Would You please provide more details how Your CST has been build;&lt;/P&gt;&lt;P&gt;what toolchain and OS were used?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Yuri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2019 05:10:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/CST-HSM-Segmentation-fault-core-dumped/m-p/966346#M143975</guid>
      <dc:creator>Yuri</dc:creator>
      <dc:date>2019-09-24T05:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: CST HSM - Segmentation fault (core dumped)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/CST-HSM-Segmentation-fault-core-dumped/m-p/966347#M143976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I solve the problem by moving the Engine constructor (ENGINE *engine_hsm (void); - e_hsm.c, line: 124), from C file to to e_hsm.h (files path: cst-3.1.0/release/code/back_end-hsm/src)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2019 11:50:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/CST-HSM-Segmentation-fault-core-dumped/m-p/966347#M143976</guid>
      <dc:creator>tomasklein</dc:creator>
      <dc:date>2019-10-25T11:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: CST HSM - Segmentation fault (core dumped)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/CST-HSM-Segmentation-fault-core-dumped/m-p/966348#M143977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did the same. But this doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does it have anything to do with version of openssl ? I am using the openssl 1.1.1 with Ubuntu18.04&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Nov 2019 11:54:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/CST-HSM-Segmentation-fault-core-dumped/m-p/966348#M143977</guid>
      <dc:creator>sudhakervincent</dc:creator>
      <dc:date>2019-11-11T11:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: CST HSM - Segmentation fault (core dumped)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/CST-HSM-Segmentation-fault-core-dumped/m-p/966349#M143978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In our case, we also using openssl version 1.1.1, cst 3.1.0 and library to comunicate with HSM (&lt;A class="link-titled" href="https://github.com/CardContact/sc-hsm-embedded" title="https://github.com/CardContact/sc-hsm-embedded"&gt;GitHub - CardContact/sc-hsm-embedded: PKCS#11 and CSP-Minidriver library for the SmartCard-HSM and STARCOS based signatu…&lt;/A&gt;&amp;nbsp;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Nov 2019 09:39:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/CST-HSM-Segmentation-fault-core-dumped/m-p/966349#M143978</guid>
      <dc:creator>tomasklein</dc:creator>
      <dc:date>2019-11-12T09:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: CST HSM - Segmentation fault (core dumped)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/CST-HSM-Segmentation-fault-core-dumped/m-p/966350#M143979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do u have any steps u had already followed. ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the error i got after using cst-hsm compilation&lt;/P&gt;&lt;P&gt;&amp;nbsp;cst[20371]: segfault at ffffffff8cdac980 ip 00007fa5b8c56fbc sp 00007ffc19f0f320 error 5 in libcrypto.so.1.1[7fa5b8b04000+29b000]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is the configuration I am using. Even i tried static compilation of those.&lt;/P&gt;&lt;P&gt;ldd /usr/bin/openssl &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;linux-vdso.so.1 (0x00007ffe39bd5000)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;libssl.so.1.1 =&amp;gt; /usr/lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007fdeefe05000)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;libcrypto.so.1.1 =&amp;gt; /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007fdeef93a000)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;libpthread.so.0 =&amp;gt; /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fdeef71b000)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;libc.so.6 =&amp;gt; /lib/x86_64-linux-gnu/libc.so.6 (0x00007fdeef32a000)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;libdl.so.2 =&amp;gt; /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fdeef126000)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/lib64/ld-linux-x86-64.so.2 (0x00007fdef0345000)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I solve the problem by moving the Engine constructor (ENGINE *engine_hsm (void); - e_hsm.c, line: 124), from C file to to e_hsm.h (files path: cst-3.1.0/release/code/back_end-hsm/src)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where exactly you moved the line ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Nov 2019 14:57:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/CST-HSM-Segmentation-fault-core-dumped/m-p/966350#M143979</guid>
      <dc:creator>sudhakervincent</dc:creator>
      <dc:date>2019-11-12T14:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: CST HSM - Segmentation fault (core dumped)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/CST-HSM-Segmentation-fault-core-dumped/m-p/1414788#M187081</link>
      <description>&lt;P&gt;The solution is correct by there are some details missing.&amp;nbsp; The function that is referenced in the newly created header file "&lt;SPAN&gt;engine_hsm" is referenced in backend.c.&amp;nbsp; Since backend.c does not see the definition, it assumes that it is a function that returns an int.&amp;nbsp; So it truncates 32 bits off of the pointer and assigns it to the return of engine_hsm.&amp;nbsp; When it passes that value to the next libcrypto call, it will fail since the pointer has been corrupted.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If you put a reference to the newly created header file in backend.c so that it sees a proper prototype, it will no longer truncate the pointer and when it is passed to the next libcrypto function, it will succed.&lt;/P&gt;&lt;P&gt;The original developer of backend-hsm must have test this with a 32bit compiler.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Feb 2022 21:06:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/CST-HSM-Segmentation-fault-core-dumped/m-p/1414788#M187081</guid>
      <dc:creator>pfaust60</dc:creator>
      <dc:date>2022-02-16T21:06:20Z</dc:date>
    </item>
  </channel>
</rss>

