oss-sec mailing list archives

Re: Re: Re: CVE-2026-31431: CopyFail: linux local privilege scalation


From: Eric Biggers <ebiggers () kernel org>
Date: Sat, 2 May 2026 20:05:00 +0000

On Sat, May 02, 2026 at 08:56:08PM +0200, Justin Swartz wrote:
Why do we need kernel modules for math?

To interact with cryptographic acceleration hardware, if present or
desired, and to provide support for kernel subsystems that rely on
encryption, like IPSec or WireGuard.

This has been covered before, but just so anyone doesn't get the wrong
impression here:

The kernel implements crypto algorithms (either as built-in code or as
modules, depending on the kconfig) so that the many kernel features that
use cryptography, such as IPsec and WireGuard that were mentioned, can
use them.  This is expected; cryptography is everywhere these days.

The problem here is specifically AF_ALG, which is an additional legacy
interface that's built on top of the kernel's crypto code.  For some
reason it exposes basically everything to unprivileged userspace
programs, and in a bug-prone way as well (e.g., zero-copy support).

If you disable AF_ALG in your kernel, then IPsec, WireGuard, and any
other kernel feature that uses cryptography will still work.

What it does break are a small set of userspace programs that made the
shortsighted decision to use AF_ALG, instead of simply following the
standard practice of using a userspace crypto library.

- Eric


Current thread: