lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 30 Jun 2017 17:27:34 +0200
From:   Richard Weinberger <richard@....at>
To:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Cc:     linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        linux-fscrypt@...r.kernel.org, David Gstir <david@...ma-star.at>,
        herbert@...dor.apana.org.au
Subject: fscrypt request_module() deadlock

Hi!

David and I faced a deadlock with switch_root when fscrypt was in use.
When /sbin/modprobe is encrypted using fscrypt and no other kernel component
requested an AES cipher before, first access to an encrypted file will trigger the
module_request() function, which will execute usermode helper /sbin/modprobe.
Is /sbin/modprobe also encrypted the kernel will deadlock because executing
it will again enter the module_request() path...

As workaround we currently do something like "ls /new_root > /dev/null" in our
initramfs to make request_module() happen before we change the root directory
to /new_root.

While this workaround is legit we think that this could be handled better.
Is there a way to request these ciphers before first usage? Herbert?
e.g. such that the filesystem can request them upon mount time.

Btw: This happens even when AES modules are builtins.

Thanks,
//richard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ