From: Eric Biggers <ebiggers@kernel.org>
To: Demi Marie Obenour <demiobenour@gmail.com>
Cc: Jan Schaumann <jschauma@netmeister.org>,
iwd@lists.linux.dev,
Linux kernel mailing list <linux-kernel@vger.kernel.org>,
linux-crypto@vger.kernel.org,
Herbert Xu <herbert@gondor.apana.org.au>
Subject: Re: AF_ALG hardening
Date: Sat, 2 May 2026 19:16:18 +0000 [thread overview]
Message-ID: <20260502191618.GA229884@google.com> (raw)
In-Reply-To: <3cc88b2d-fbd6-4e47-b82c-3c685fec0581@gmail.com>
On Sat, May 02, 2026 at 12:52:57AM -0400, Demi Marie Obenour wrote:
> > Either way, the first step will be to create the algorithm allowlist,
> > which should happen anyway, regardless of the other changes.
>
> The simplest changes I can see are:
>
> 1. Get rid of zero-copy support (splice()).
> 2. Get rid of AIO support.
> 3. Only allow software implementations.
>
> All of these are really simple. I can send patches, but be warned
> that they would only be compile-tested, as I don't know how to test
> the code.
If you're interested, please send patches, and we'll see where things go
from there. We need to get more people helping with this stuff.
For (1), it probably should work like the way the zero-copy support was
disabled in the 6.1 LTS kernel last year, where (I think) the splice()
syscall still succeeds but it just copies the data.
For (2) and (3), you can find examples of disabling asynchronous crypto
API stuff at
https://lore.kernel.org/linux-fscrypt/20250704070322.20692-1-ebiggers@kernel.org/
and
https://lore.kernel.org/linux-fscrypt/20250708181313.66961-1-ebiggers@kernel.org/.
Note that to request a synchronous algorithm you have to pass
CRYPTO_ALG_ASYNC (yes, really).
I think there are a few test scripts for AF_ALG in libkcapi. Besides
that AF_ALG is barely tested. So you're in good company.
- Eric
next prev parent reply other threads:[~2026-05-02 19:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <afJorKIje4O6dXbH@netmeister.org>
[not found] ` <d6111caa-db61-498a-92cb-ea7a0aa0a5e2@ehuk.net>
[not found] ` <87se8dgicq.fsf@gentoo.org>
[not found] ` <afL-QhLfEKqHZqka@eldamar.lan>
[not found] ` <20260430071917.GB54208@sol>
[not found] ` <177abb5d-8ba9-4bb9-8b23-9fbc868ed3cd@gmail.com>
[not found] ` <20260501180028.GA2260@sol>
[not found] ` <19837ef5-e5b6-45f4-8336-3ce07423dfb1@gmail.com>
[not found] ` <20260501201841.GA2540@quark>
[not found] ` <c13dd3c5-ddc1-431e-bc7d-2de39c551f8e@gmail.com>
[not found] ` <20260502033556.GA3872267@google.com>
2026-05-02 4:52 ` AF_ALG hardening Demi Marie Obenour
2026-05-02 8:19 ` Simon Richter
2026-05-02 20:42 ` Demi Marie Obenour
2026-05-02 19:16 ` Eric Biggers [this message]
2026-05-04 19:01 ` Simon Richter
2026-05-04 19:54 ` Eric Biggers
[not found] ` <20260502035402.GB3872267@google.com>
2026-05-02 6:39 ` [oss-security] CVE-2026-31431: CopyFail: linux local privilege scalation Demi Marie Obenour
[not found] ` <CAM=PXV4q2i13W8Z_AZGDfdxbqWANJ=U4Sw3FTcv5mH_QUrrSfA@mail.gmail.com>
[not found] ` <afcqxCv58YrhbtVr@definition.pseudorandom.co.uk>
2026-05-03 19:20 ` Greg Dahlman
[not found] ` <cfe5a1f5-f7fe-44a5-8af9-8e4c8d68b3d7@terraraq.uk>
2026-05-02 22:32 ` Demi Marie Obenour
2026-05-03 6:30 ` Peter Gutmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260502191618.GA229884@google.com \
--to=ebiggers@kernel.org \
--cc=demiobenour@gmail.com \
--cc=herbert@gondor.apana.org.au \
--cc=iwd@lists.linux.dev \
--cc=jschauma@netmeister.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox