<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:28:35 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-16621] File and directory names are not encrypted when using secure boot</title>
                <link>https://jira.whamcloud.com/browse/LU-16621</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;h3&gt;&lt;a name=&quot;Fileanddirectorynamesarenotencryptedwhenusingsecureboot&quot;&gt;&lt;/a&gt;File and directory names are not encrypted when using secure boot&lt;/h3&gt;
&lt;h3&gt;&lt;a name=&quot;Stepstoreproduce&quot;&gt;&lt;/a&gt;Steps to reproduce&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;Enable encryption for file and directory names&lt;/li&gt;
	&lt;li&gt;Create a test directory on top of the Lustre filesystem and enable encryption for this directory&lt;/li&gt;
	&lt;li&gt;Copy some files to the test directory&lt;/li&gt;
	&lt;li&gt;Lock the encrypted directory&lt;/li&gt;
	&lt;li&gt;Try to access the encrypted directory and check the content and file names
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-sh&quot;&gt;
mgs&lt;span class=&quot;code-comment&quot;&gt;# lctl set_param -P llite.*.enable_filename_encryption=1
&lt;/span&gt;...
client% sudo fscrypt setup
client% sudo fscrypt setup /mnt/lustre
client% sudo install -v -d -m 0777 -o stack -g stack /mnt/lustre/test
client% fscrypt encrypt /mnt/lustre/test
client% cp /etc/passwd /mnt/lustre/test
client% fscrypt lock /mnt/lustre/test
client% ls -l /mnt/lustre/test
client% md5sum /mnt/lustre/test/*
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;&lt;a name=&quot;Expectedresults&quot;&gt;&lt;/a&gt;Expected results&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;The content of the files are encrypted and unavailable until the test directory is locked&lt;/li&gt;
	&lt;li&gt;The original file and directory names are encrypted and not not visible&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;&lt;a name=&quot;Expectedoutput&quot;&gt;&lt;/a&gt;Expected output&lt;/h3&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-sh&quot;&gt;
+ fscrypt encrypt /mnt/lustre/test
...
&lt;span class=&quot;code-quote-red&quot;&gt;&quot;/mnt/lustre/test&quot;&lt;/span&gt; is now encrypted, unlocked, and ready &lt;span class=&quot;code-object&quot;&gt;for&lt;/span&gt; use.
+ cp /etc/passwd /mnt/lustre/test
+ fscrypt lock /mnt/lustre/test
&lt;span class=&quot;code-quote-red&quot;&gt;&quot;/mnt/lustre/test&quot;&lt;/span&gt; is now locked.
+ ls -l /mnt/lustre/test
-rw-r--r--. 1 stack stack 4096 Feb 17 15:53 iY5cBB+f8Olgcy3H,nCarFqOaTmZuOxEZby9hOSMfBG
+ md5sum /mnt/lustre/test/iY5cBB+f8Olgcy3H,nCarFqOaTmZuOxEZby9hOSMfBG
md5sum: /mnt/lustre/test/iY5cBB+f8Olgcy3H,nCarFqOaTmZuOxEZby9hOSMfBG: Required key not available
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;h3&gt;&lt;a name=&quot;Actualresults&quot;&gt;&lt;/a&gt;Actual results&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;font color=&quot;#00875a&quot;&gt;The content of the files are encrypted and unavailable until the test directory is locked&lt;/font&gt;&lt;/li&gt;
	&lt;li&gt;&lt;font color=&quot;#de350b&quot;&gt;The original file and directory names are unencrypted and visible&lt;/font&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;&lt;a name=&quot;Actualoutput&quot;&gt;&lt;/a&gt;Actual output&lt;/h3&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-sh&quot;&gt;
...
+ fscrypt encrypt /mnt/lustre/test
...
&lt;span class=&quot;code-quote-red&quot;&gt;&quot;/mnt/lustre/test&quot;&lt;/span&gt; is now encrypted, unlocked, and ready &lt;span class=&quot;code-object&quot;&gt;for&lt;/span&gt; use.
+ cp /etc/passwd /mnt/lustre/test
+ fscrypt lock /mnt/lustre/test
&lt;span class=&quot;code-quote-red&quot;&gt;&quot;/mnt/lustre/test&quot;&lt;/span&gt; is now locked.
+ ls -l /mnt/lustre/test
-rw-r--r--. 1 stack stack 4096 Feb 17 15:51 passwd
+ md5sum /mnt/lustre/test/passwd
md5sum: /mnt/lustre/test/passwd: Required key not available
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;h3&gt;&lt;a name=&quot;Compatibilityandportability&quot;&gt;&lt;/a&gt;Compatibility and portability&lt;/h3&gt;

&lt;p&gt;The same issue can be reproduced on the Ubuntu 22.04 client(s) with kernel version 5.15.0 when Secure Boot is enabled&lt;/p&gt;
&lt;h3&gt;&lt;a name=&quot;Workaround&quot;&gt;&lt;/a&gt;Workaround&lt;/h3&gt;

&lt;p&gt;If we just disable secure boot, then encryption of directory and file names works as expected&lt;/p&gt;
&lt;h3&gt;&lt;a name=&quot;Rootcause&quot;&gt;&lt;/a&gt;Root cause&lt;/h3&gt;

&lt;p&gt;Secure Boot is a verification mechanism for ensuring that code launched by a computer&apos;s UEFI firmware is trusted. It is designed to protect a system against malicious code being loaded and executed early in the boot process, before the operating system has been loaded.&lt;/p&gt;

&lt;p&gt;Secure Boot works using cryptographic checksums and signatures. Each program that is loaded by the firmware includes a signature and a checksum, and before allowing execution the firmware will verify that the program is trusted by validating the checksum and the signature. When Secure Boot is enabled on a system, any attempt to execute an untrusted program will not be allowed. This stops unexpected / unauthorised code from running in the UEFI environment.&lt;/p&gt;

&lt;p&gt;By its very design, Secure Boot may affect or limit some things that users want to do.&lt;br/&gt;
For example, activates &lt;a href=&quot;https://man7.org/linux/man-pages/man7/kernel_lockdown.7.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;lockdown&lt;/a&gt; mode in the Linux kernel (references: &lt;a href=&quot;https://lore.kernel.org/lkml/CA+55aFzG==xr2OLK8F03RH0nkUDeP6btWqepFTuHZqkPTAOWjQ@mail.gmail.com/T/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Kernel lockdown for secure boot&lt;/a&gt; and &lt;a href=&quot;https://patchwork.kernel.org/project/linux-security-module/patch/152346403637.4030.15247096217928429102.stgit@warthog.procyon.org.uk/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;debugfs: Restrict debugfs when the kernel is locked down&lt;/a&gt;). When lockdown is in effect, a number of features are disabled or have their use restricted. This includes special device files and kernel services that allow direct access of the kernel image:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;tt&gt;/dev/mem&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;/dev/kmem&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;/dev/kcore&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;/dev/ioports&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;BPF&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;kprobes&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;And the ability to directly configure and control devices, so as to prevent the use of a device to access or modify a kernel image:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;The use of module parameters that directly specify hardware parameters to drivers through the kernel command line or when loading a module&lt;/li&gt;
	&lt;li&gt;The use of direct PCI BAR access&lt;/li&gt;
	&lt;li&gt;The use of the ioperm and iopl instructions on x86 arch&lt;/li&gt;
	&lt;li&gt;The use of the KD*IO console ioctls&lt;/li&gt;
	&lt;li&gt;The use of the TIOCSSERIAL serial ioctl&lt;/li&gt;
	&lt;li&gt;The alteration of MSR registers on x86 arch&lt;/li&gt;
	&lt;li&gt;The replacement of the PCMCIA CIS&lt;/li&gt;
	&lt;li&gt;The overriding of ACPI tables&lt;/li&gt;
	&lt;li&gt;The use of ACPI error injection&lt;/li&gt;
	&lt;li&gt;The specification of the ACPI RDSP address&lt;/li&gt;
	&lt;li&gt;The use of ACPI custom methods&lt;/li&gt;
&lt;/ul&gt;


&lt;h4&gt;&lt;a name=&quot;Certainfacilitiesarerestricted%3A&quot;&gt;&lt;/a&gt;Certain facilities are restricted:&lt;/h4&gt;
&lt;ul&gt;
	&lt;li&gt;Only validly signed modules may be loaded (waived if the module file being loaded is vouched for by IMA appraisal)&lt;/li&gt;
	&lt;li&gt;Only validly signed binaries may be kexec&apos;d (waived if the binary image file to be executed is vouched for by IMA appraisal)&lt;/li&gt;
	&lt;li&gt;Unencrypted hibernation/suspend to swap are disallowed as the kernel image is saved to a medium that can then be accessed&lt;/li&gt;
	&lt;li&gt;Use of debugfs is not permitted as this allows a whole range of actions including direct configuration of, access to and driving of hardware&lt;/li&gt;
	&lt;li&gt;IMA requires the addition of the &quot;secure_boot&quot; rules to the policy, whether or not they are specified on the command line, for both the built-in and custom policies in secure boot lockdown mode&lt;/li&gt;
&lt;/ul&gt;


&lt;h4&gt;&lt;a name=&quot;Themostimportantrestrictionsforus%3A&quot;&gt;&lt;/a&gt;The most important restrictions for us:&lt;/h4&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;font color=&quot;#de350b&quot;&gt;Only validly signed modules may be loaded&lt;/font&gt;&lt;/li&gt;
	&lt;li&gt;&lt;font color=&quot;#de350b&quot;&gt;Only validly signed binaries may be kexec&apos;d &lt;/font&gt;&lt;/li&gt;
	&lt;li&gt;&lt;font color=&quot;#de350b&quot;&gt;Use of debugfs is not permitted&lt;/font&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Lustre filesystem and &lt;tt&gt;llite&lt;/tt&gt; (client VFS interface) actively uses the debugfs subsystem and registers many access points there.&lt;/p&gt;</description>
                <environment></environment>
        <key id="74949">LU-16621</key>
            <summary>File and directory names are not encrypted when using secure boot</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.whamcloud.com/images/icons/priorities/major.svg">Major</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="1">Fixed</resolution>
                                        <assignee username="Deiter">Alex Deiter</assignee>
                                    <reporter username="Deiter">Alex Deiter</reporter>
                        <labels>
                    </labels>
                <created>Mon, 6 Mar 2023 16:42:35 +0000</created>
                <updated>Tue, 25 Apr 2023 03:58:18 +0000</updated>
                            <resolved>Mon, 13 Mar 2023 13:05:02 +0000</resolved>
                                                    <fixVersion>Lustre 2.16.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="364989" author="gerrit" created="Mon, 6 Mar 2023 16:46:23 +0000"  >&lt;p&gt;&quot;Alex Deiter &amp;lt;alex.deiter@gmail.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/50219&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/50219&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16621&quot; title=&quot;File and directory names are not encrypted when using secure boot&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16621&quot;&gt;&lt;del&gt;LU-16621&lt;/del&gt;&lt;/a&gt; enc: file names encryption when using secure boot&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: fce9c54ea823022a14b6a3696e163bd27270a505&lt;/p&gt;</comment>
                            <comment id="365055" author="sebastien" created="Tue, 7 Mar 2023 09:45:54 +0000"  >&lt;p&gt;Given that the problem with secure boot is that it prevents access to debugfs, patch #50219 (which is fine) will certainly not be enough to have a functional Lustre client, as there are so many other Lustre parameters handled via debugfs.&lt;/p&gt;</comment>
                            <comment id="365655" author="gerrit" created="Mon, 13 Mar 2023 06:05:48 +0000"  >&lt;p&gt;&quot;Oleg Drokin &amp;lt;green@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/50219/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/50219/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16621&quot; title=&quot;File and directory names are not encrypted when using secure boot&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16621&quot;&gt;&lt;del&gt;LU-16621&lt;/del&gt;&lt;/a&gt; enc: file names encryption when using secure boot&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 716675fff642655c4d4715654b0b4880b96139b6&lt;/p&gt;</comment>
                            <comment id="365700" author="pjones" created="Mon, 13 Mar 2023 13:05:02 +0000"  >&lt;p&gt;Landed for 2.16&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <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_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i03fpr:</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>