Re: [PATCH 2/3] AF_ALG: Drop support for off-CPU cryptography

From: Richard Weinberger

Date: Sun Jul 26 2026 - 03:31:52 EST


On Sun, Jul 26, 2026 at 1:09 AM Eric Biggers <ebiggers@xxxxxxxxxx> wrote:
> > You've only mentioned that it "can" be used in this way in upstream.
> > Can you confirm that it *is* used, and with an actual upstream algorithm
> > name, and if so which one(s)? And if so, would you also be able to
> > share whether this is for dm-crypt or not? We should remember that
> > dm-crypt accepts keys directly and AF_ALG is not needed to use it.
>
> We'd also need to know whether the user (if there is one) requires
> unprivileged use.
>
> Hopefully not: these sorts of hardware crypto drivers have lots of bugs.
> Indeed, the CAAM "cbc(paes)" doesn't validate the key length correctly,
> leaks DMA mappings, concurrent requests race with each other, etc...

Uff, you're right. There are some nasty bugs.
I guess nobody noticed so far because the algorithm is only used a few times
at bootup (as root).

--
Thanks,
//richard