Article View: linux.debian.kernel
Article #25Bug#1150677: linux: Linux logs error `ima: Can not allocate sha384 (reason: -2)`
From: Paul Menzel
Date: Mon, 12 Oct 2026 07:10
Date: Mon, 12 Oct 2026 07:10
70 lines
3601 bytes
3601 bytes
Package: src:linux
Version: 7.2.9-1
Severity: minor
Dear Debian folks,
On a Dell XPS 13 7390, BIOS 1.29.0, Nuvoton TPM 2.0 NTC0702, Linux
7.2.9-1 (*linux-image-7.2.9+deb14-amd64* 7.2.9-1) logs the error below:
[ 0.546039] ima: Allocated hash algorithm: sha256
[ 0.548233] ima: Can not allocate sha384 (reason: -2)
sha384 is provided by `CONFIG_CRYPTO_SHA512` (`crypto/sha512.c`), which
`debian/config/config` sets to m:
$ grep SHA512 /boot/config-7.2.9+deb14-amd64
# CONFIG_MODULE_SIG_SHA512 is not set
CONFIG_CRYPTO_SHA512=m
CONFIG_CRYPTO_LIB_SHA512=y
CONFIG_CRYPTO_LIB_SHA512_ARCH=y
SHA-1 works because IMA selects `CRYPTO_SHA1` resulting in:
$ grep CRYPTO_SHA1 /boot/config-7.2.9+deb14-amd64
CONFIG_CRYPTO_SHA1=y
SHA-256 works because `debian/config/config` already builds it in βfor
IMA_DEFAULT_HASH_SHA256β.
$ grep CRYPTO_SHA256 /boot/config-7.2.9+deb14-amd64
CONFIG_CRYPTO_SHA256=y
SHA-384 gets -ENOENT.
Please consider setting
CONFIG_CRYPTO_SHA512=y
next to `CONFIG_CRYPTO_SHA256=y`. `CONFIG_CRYPTO_LIB_SHA512` is already
built in, so only the crypto API glue moves into vmlinux.
Tested on Dell XPS 13 7390.
Kind regards,
Paul
PS: `ima_init_crypto()` runs as a late initcall. It allocates a shash
for every PCR bank, the TPM reports as active.
`tpm2_get_pcr_allocation()` skips banks without selected PCRs. With the
default ima_hash and no policy loaded yet, that loop is the only place
requesting sha384, so this TPM has an active SHA-384 bank.
The effect is more than a log message. For a bank without a tfm, IMA
extends PCR 10 with the zero-padded SHA-1 template digest (see the
comment βfor unmapped TPM algorithms digest is still a padded SHA1β in
`ima_calc_field_array_hash()`). So the SHA-384 bank of PCR 10 does not
contain SHA-384 measurements.
PPS: Related to bug report #1144056 [1].
https://bugs.debian.org/1144056
Technical Details
Message-ID:
<NNikx-51Zt-1@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.samoylyk.net!gothmog.csi.it!news.servidellagleba.it!bofh.it!news.nic.it!robomodShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.samoylyk.net!gothmog.csi.it!news.servidellagleba.it!bofh.it!news.nic.it!robomod From: Paul Menzel <pmenzel@molgen.mpg.de> Newsgroups: linux.debian.bugs.dist,linux.debian.kernel Subject: Bug#1150677: linux: Linux logs error `ima: Can not allocate sha384 (reason: -2)` Date: Mon, 12 Oct 2026 09:10:01 +0200 Message-ID: <NNikx-51Zt-1@gated-at.bofh.it> X-Original-To: submit@bugs.debian.org X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Mon Oct 12 07:05:10 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.451 Reply-To: Paul Menzel <pmenzel@molgen.mpg.de>, 1150677@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: debian-kernel@lists.debian.org X-Debian-Pr-Message: report 1150677 X-Debian-Pr-Package: src:linux X-Debian-Pr-Source: linux MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/1996360 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 70 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Mon, 12 Oct 2026 09:02:19 +0200 X-Original-Message-ID: <efb46f3c-ff3c-4a20-a40c-469b64e881c1@molgen.mpg.de>