<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:52:55 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-12475] Lustre file system is causing kernel panic issue when using with fips enabled kernel</title>
                <link>https://jira.whamcloud.com/browse/LU-12475</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;While using lustre filesystem with FIPS enabled kernel on rhel7.6 I am facing kernel panic.&lt;/p&gt;

&lt;p&gt;System Information &amp;amp; Panic string.&lt;/p&gt;

&lt;p&gt;crash&amp;gt; sys|grep -e NODENAME -e RELEASE -e PANIC&lt;br/&gt;
 NODENAME: ip-172-31-14-243.ec2.internal&lt;br/&gt;
 RELEASE: 3.10.0-957.21.3.el7.x86_64&lt;br/&gt;
 PANIC: &quot;Kernel panic - not syncing: Module libcfs signature verification failed in FIPS mode&quot;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;#cat /proc/cmdline&lt;br/&gt;
BOOT_IMAGE=/boot/vmlinuz-3.10.0-957.21.3.el7.x86_64 root=UUID=50a9826b-3a50-44d0-ad12-28f2056e9927 ro console=ttyS0,115200n8 console=tty0 net.ifnames=0 crashkernel=auto fips=1&lt;/p&gt;

&lt;p&gt;Backtrace:-&lt;/p&gt;

&lt;p&gt;crash&amp;gt; bt&lt;br/&gt;
PID: 11597 TASK: ffff8f4a9de88000 CPU: 1 COMMAND: &quot;modprobe&quot;&lt;br/&gt;
 #0 &lt;span class=&quot;error&quot;&gt;&amp;#91;ffff8f493b3d7af0&amp;#93;&lt;/span&gt; machine_kexec at ffffffffbbc63934&lt;br/&gt;
 #1 &lt;span class=&quot;error&quot;&gt;&amp;#91;ffff8f493b3d7b50&amp;#93;&lt;/span&gt; __crash_kexec at ffffffffbbd1d162&lt;br/&gt;
 #2 &lt;span class=&quot;error&quot;&gt;&amp;#91;ffff8f493b3d7c20&amp;#93;&lt;/span&gt; panic at ffffffffbc35c81b&lt;br/&gt;
 #3 &lt;span class=&quot;error&quot;&gt;&amp;#91;ffff8f493b3d7ca0&amp;#93;&lt;/span&gt; crypto_check_alg at ffffffffbbf2286a&lt;br/&gt;
 #4 &lt;span class=&quot;error&quot;&gt;&amp;#91;ffff8f493b3d7cc8&amp;#93;&lt;/span&gt; crypto_register_alg at ffffffffbbf23144&lt;br/&gt;
 #5 &lt;span class=&quot;error&quot;&gt;&amp;#91;ffff8f493b3d7ce8&amp;#93;&lt;/span&gt; crypto_register_shash at ffffffffbbf2961f&lt;br/&gt;
 #6 &lt;span class=&quot;error&quot;&gt;&amp;#91;ffff8f493b3d7d00&amp;#93;&lt;/span&gt; cfs_crypto_adler32_register at ffffffffc049f225 &lt;span class=&quot;error&quot;&gt;&amp;#91;libcfs&amp;#93;&lt;/span&gt;&lt;br/&gt;
 #7 &lt;span class=&quot;error&quot;&gt;&amp;#91;ffff8f493b3d7d10&amp;#93;&lt;/span&gt; cfs_crypto_register at ffffffffc049ea11 &lt;span class=&quot;error&quot;&gt;&amp;#91;libcfs&amp;#93;&lt;/span&gt;&lt;br/&gt;
 #8 &lt;span class=&quot;error&quot;&gt;&amp;#91;ffff8f493b3d7d20&amp;#93;&lt;/span&gt; init_module at ffffffffc04391a9 &lt;span class=&quot;error&quot;&gt;&amp;#91;libcfs&amp;#93;&lt;/span&gt;&lt;br/&gt;
 #9 &lt;span class=&quot;error&quot;&gt;&amp;#91;ffff8f493b3d7d38&amp;#93;&lt;/span&gt; do_one_initcall at ffffffffbbc0210a&lt;br/&gt;
#10 &lt;span class=&quot;error&quot;&gt;&amp;#91;ffff8f493b3d7d68&amp;#93;&lt;/span&gt; load_module at ffffffffbbd192dc&lt;br/&gt;
#11 &lt;span class=&quot;error&quot;&gt;&amp;#91;ffff8f493b3d7eb8&amp;#93;&lt;/span&gt; sys_finit_module at ffffffffbbd19956&lt;br/&gt;
#12 &lt;span class=&quot;error&quot;&gt;&amp;#91;ffff8f493b3d7f50&amp;#93;&lt;/span&gt; system_call_fastpath at ffffffffbc375ddb&lt;br/&gt;
 RIP: 00007f378a796349 RSP: 00007ffd08ad98a8 RFLAGS: 00010202&lt;br/&gt;
 RAX: 0000000000000139 RBX: 000000000101b850 RCX: 00007f378a78d0f0&lt;br/&gt;
 RDX: 0000000000000000 RSI: 000000000041a94e RDI: 0000000000000000&lt;br/&gt;
 RBP: 000000000041a94e R8: 0000000000000000 R9: 00000000010192d0&lt;br/&gt;
 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000&lt;br/&gt;
 R13: 000000000101b7f0 R14: 0000000000040000 R15: 0000000000000000&lt;br/&gt;
 ORIG_RAX: 0000000000000139 CS: 0033 SS: 002b&lt;/p&gt;


&lt;p&gt;Fuction which is responsible for Kernel Panic here.&lt;/p&gt;


&lt;p&gt;&amp;gt;&amp;gt;kernel-3.10.0-957.el7/crypto/algapi.c&lt;/p&gt;


&lt;p&gt;static inline void crypto_check_module_sig(struct module *mod)&lt;/p&gt;
{
#ifdef CONFIG_CRYPTO_FIPS
 if (fips_enabled &amp;amp;&amp;amp; mod &amp;amp;&amp;amp; !mod-&amp;gt;sig_ok)
 panic(&quot;Module %s signature verification failed in FIPS mode\n&quot;,
 mod-&amp;gt;name);
#endif
 return;
}

&lt;p&gt;As the function &quot;crypto_check_alg&quot; is calling &quot;crypto_check_module_sig&quot; to check the signature of module here.&lt;/p&gt;

&lt;p&gt;static int crypto_check_alg(struct crypto_alg *alg)&lt;/p&gt;
{
 crypto_check_module_sig(alg-&amp;gt;cra_module);

if (alg-&amp;gt;cra_alignmask &amp;amp; (alg-&amp;gt;cra_alignmask + 1))
 return -EINVAL;

if (alg-&amp;gt;cra_blocksize &amp;gt; PAGE_SIZE / 8)
 return -EINVAL;

if (alg-&amp;gt;cra_priority &amp;lt; 0)
 return -EINVAL;

atomic_set(&amp;amp;alg-&amp;gt;cra_refcnt, 1);

return crypto_set_driver_name(alg);
}

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Further checking module libcsf doesn&apos;t have the signature field here as we can see in case of nvme_core modules we are getting sig_ok field as true but in case of libcfs sig_ok is false.&lt;/p&gt;

&lt;p&gt;crash&amp;gt; struct module ffffffffc00b1480|grep -e name -e sig_ok&lt;br/&gt;
 name = &quot;nvme_core\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000&quot;,&lt;br/&gt;
 name = 0xffff8f48b4c63280 &quot;nvme_core&quot;,&lt;br/&gt;
 sig_ok = true,&lt;/p&gt;

&lt;p&gt;crash&amp;gt; struct module ffffffffc04c5120|grep -e name -e sig_ok&lt;br/&gt;
 name = &quot;libcfs\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000&quot;,&lt;br/&gt;
 name = 0xffff8f48b40b77b8 &quot;libcfs&quot;,&lt;br/&gt;
 sig_ok = false,&lt;/p&gt;

&lt;p&gt;Sequence of events :-&lt;/p&gt;

&lt;p&gt;1. Mounting lustre file system leads to libcfs.ko being loaded&lt;br/&gt;
2. libcfs calls a kernel function: crypto_register_shash() used for defining new hash type&lt;br/&gt;
3. That function calls crypto_register_alg which is calling crypto_check_alg() which further uses or calls &lt;br/&gt;
 crypto_check_module_sig()&lt;br/&gt;
4. A check is performed: are we in FIPS mode and does libcfs have a valid signature? ... If not, panic.&lt;/p&gt;

&lt;p&gt;In Summary &quot;libcfs calls a kernel function(kernel crypto function) whose use is forbidden (by non-signed modules) in FIPS mode&quot; .&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;modinfo libcfs&lt;br/&gt;
filename: /lib/modules/3.10.0-957.21.2.el7.x86_64/weak-updates/lustre-client/net/libcfs.ko&lt;br/&gt;
license: GPL&lt;br/&gt;
version: 0.5.0&lt;br/&gt;
description: Lustre helper library&lt;br/&gt;
author: OpenSFS, Inc. &amp;lt;&lt;a href=&quot;http://www.lustre.org/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.lustre.org/&lt;/a&gt;&amp;gt;&lt;br/&gt;
retpoline: Y&lt;br/&gt;
rhelversion: 7.6&lt;br/&gt;
srcversion: B62994CF6EF3B80D9BF4F03&lt;br/&gt;
depends:&lt;br/&gt;
vermagic: 3.10.0-957.el7.x86_64 SMP mod_unload modversions&lt;br/&gt;
parm: libcfs_subsystem_debug:Lustre kernel debug subsystem mask (int)&lt;br/&gt;
parm: libcfs_debug:Lustre kernel debug mask (int)&lt;br/&gt;
parm: libcfs_debug_mb:Total debug buffer size. (uint)&lt;br/&gt;
parm: libcfs_printk:Lustre kernel debug console mask (uint)&lt;br/&gt;
parm: libcfs_console_ratelimit:Lustre kernel debug console ratelimit (0 to disable) (uint)&lt;br/&gt;
parm: libcfs_console_max_delay:Lustre kernel debug console max delay (jiffies) (uint)&lt;br/&gt;
parm: libcfs_console_min_delay:Lustre kernel debug console min delay (jiffies) (uint)&lt;br/&gt;
parm: libcfs_console_backoff:Lustre kernel debug console backoff factor (uint)&lt;br/&gt;
parm: libcfs_panic_on_lbug:Lustre kernel panic on LBUG (uint)&lt;br/&gt;
parm: libcfs_debug_file_path:Path for dumping debug logs, set &apos;NONE&apos; to prevent log dumping (charp)&lt;br/&gt;
parm: cpu_npartitions:# of CPU partitions (int)&lt;br/&gt;
parm: cpu_pattern:CPU partitions pattern (charp)&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Can we signing the modules so they will work in a FIPS enabled kernel&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment>lustre-client-2.10.5-1.el7.x86_64.rpm with rhel7.6</environment>
        <key id="56196">LU-12475</key>
            <summary>Lustre file system is causing kernel panic issue when using with fips enabled kernel</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="3">Duplicate</resolution>
                                        <assignee username="wc-triage">WC Triage</assignee>
                                    <reporter username="Romesh17">Romesh17</reporter>
                        <labels>
                    </labels>
                <created>Wed, 26 Jun 2019 04:08:09 +0000</created>
                <updated>Mon, 15 Jun 2020 20:04:24 +0000</updated>
                            <resolved>Mon, 15 Jun 2020 20:04:24 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                            <comments>
                            <comment id="270249" author="gerrit" created="Thu, 14 May 2020 20:14:14 +0000"  >&lt;p&gt;Jeremy Filizetti (jeremy.filizetti@gmail.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/38605&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/38605&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12475&quot; title=&quot;Lustre file system is causing kernel panic issue when using with fips enabled kernel&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12475&quot;&gt;&lt;del&gt;LU-12475&lt;/del&gt;&lt;/a&gt; libcfs: don&apos;t register crypto if it can cause a panic&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_12&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 2ecea577d07c521ef85fe2571c487d7f5e47e328&lt;/p&gt;</comment>
                            <comment id="270251" author="simmonsja" created="Thu, 14 May 2020 20:57:23 +0000"  >&lt;p&gt;No patch for master?&lt;/p&gt;</comment>
                            <comment id="272917" author="jfilizetti" created="Mon, 15 Jun 2020 19:53:50 +0000"  >&lt;p&gt;I think we can close this ticket in favor of the patch in &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13355&quot; title=&quot;adler32 wrapper in libcfs&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13355&quot;&gt;&lt;del&gt;LU-13355&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="58343">LU-13355</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10030" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Epic/Theme</customfieldname>
                        <customfieldvalues>
                                        <label>build</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i00ir3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10060" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Severity</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[3]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>