Wireless Daemon for Linux
 help / color / mirror / Atom feed
From: Demi Marie Obenour <demiobenour@gmail.com>
To: Milan Broz <gmazyland@gmail.com>,
	oss-security@lists.openwall.com,
	Eric Biggers <ebiggers@kernel.org>
Cc: Jan Schaumann <jschauma@netmeister.org>, iwd@lists.linux.dev
Subject: Re: [oss-security] CVE-2026-31431: CopyFail: linux local privilege scalation
Date: Mon, 4 May 2026 02:13:01 -0400	[thread overview]
Message-ID: <16a713ee-4cf3-4f40-a532-8a937eaffd21@gmail.com> (raw)
In-Reply-To: <021503ca-8a9b-4f9d-8b8e-81661572a018@gmail.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 2514 bytes --]

On 5/4/26 01:57, Milan Broz wrote:
> Hi,
> 
> On 5/1/26 9:24 PM, Demi Marie Obenour wrote:
>> Cryptsetup needs CAP_SYS_ADMIN, but iwd definitely does not, and
>> presumably BlueZ should not use have it either.
> 
> In cryptsetup, AF_ALG is used exactly in places where it does
> NOT need CAP_SYS_ADMIN.
> 
> While I agree that AF_ALG is misdesigned (specifically, indirect
> loading of kernel modules just on non-privileged user request),
> it is used in real scenarios.
> 
> I can write a long story why it is used in cryptsetup, but long
> story short:
> 
> - It is used for benchmarking, where we actually need kernel crypto.
> 
> As it will be used in real dm-crypt mapping later, benchmarking
> userspace lib just does not make sense.
> (Requiring CAP_SYS_ADMIN here is not such a big issue, and it is
> a very rough test - but useful for relative comparison, not for the
> real numbers.)

Would an API to ask the kernel to benchmark its own algorithms work
for this?  That would be a more accurate benchmark as it removes
syscall overhead.

> - It is used in TrueCrypt/VeraCrypt compatibility (at least).
> 
> This format needs to decrypt the header (first sector) with
> the same algorithms as it is later mapped through dm-crypt.
> Not everything is available in userspace (we support all historic
> versions) and using AF_ALG was very convenient here.
> 
> By removing AF_ALG, you will completely break this format support.
> including some distros (I think Tails uses that :).
> 
> We are using userspace libraries, but removing AF_ALG would be a pain.
> It can be done, but it requires time.

What is the source of the difficulty here?  Just curious.

>> Cryptsetup is a special case because there are times when it may not
>> be safe to allocate memory: if I/O to the swap partition is suspended,
>> and the kernel tries to page data out to it, the system may deadlock.
>> So calling into arbitrary third-party libraries might not be the best
>> idea.  Thankfully, Nettle should meet all of cryptsetup's requirements.
> 
> The cause with the swap is not such a big deal in reality.
> 
> Nettle is NO WAY for cryptsetup (we have support for it as an alternative
> backend, but it cannot be the default). You do not see the whole picture.

I definitely don't see the whole picture.  It came to mind because
it has a nice, easy-to-use API.

I'm also curious what keeps it from being the default.
-- 
Sincerely,
Demi Marie Obenour (she/her/hers)

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 7253 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2026-05-04  6:13 UTC|newest]

Thread overview: 16+ 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>
2026-05-01 19:24             ` [oss-security] CVE-2026-31431: CopyFail: linux local privilege scalation Demi Marie Obenour
2026-05-01 20:18               ` Eric Biggers
2026-05-02  0:21                 ` Demi Marie Obenour
2026-05-02  3:35                   ` Eric Biggers
2026-05-02  3:54                     ` Eric Biggers
2026-05-02  6:39                       ` Demi Marie Obenour
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
2026-05-04 19:01                         ` Simon Richter
2026-05-04 19:54                           ` Eric Biggers
2026-05-04  5:57               ` [oss-security] CVE-2026-31431: CopyFail: linux local privilege scalation Milan Broz
2026-05-04  6:13                 ` Demi Marie Obenour [this message]
2026-05-04  6:43                   ` Eric Biggers
2026-05-04  7:14                     ` Milan Broz

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=16a713ee-4cf3-4f40-a532-8a937eaffd21@gmail.com \
    --to=demiobenour@gmail.com \
    --cc=ebiggers@kernel.org \
    --cc=gmazyland@gmail.com \
    --cc=iwd@lists.linux.dev \
    --cc=jschauma@netmeister.org \
    --cc=oss-security@lists.openwall.com \
    /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