Re: [PATCH] crypto: af_alg - Add af_alg_restrict sysctl, defaulting to 1
Rosen Penev <[email protected]> Tue, 23 Jun 2026 15:06:36 -0700
| Newsgroups | dev.linux.lists.iwd,org.kernel.vger.linux-bluetooth,org.kernel.vger.linux-crypto,org.kernel.vger.linux-doc,org.kernel.vger.linux-hardening,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CAKxU2N_yu1LZeNxEUkhahx_5VYML7PZ0-EZfP94p7SmpWbO6qg@mail.gmail.com> |
On Tue, Jun 23, 2026 at 2:47=E2=80=AFPM Eric Biggers <[email protected]> = wrote: > > On Tue, Jun 23, 2026 at 02:28:17PM -0700, Rosen Penev wrote: > > > +static const struct af_alg_allowlist_entry hash_allowlist[] =3D { > > > + { "cmac(aes)", true }, /* iwd, bluez */ > > > + { "hmac(md5)", true }, /* iwd */ > > > + { "hmac(sha1)", true }, /* iwd */ > > > + { "hmac(sha224)", true }, /* iwd */ > > > + { "hmac(sha256)", true }, /* iwd */ > > > + { "hmac(sha384)", true }, /* iwd */ > > > + { "hmac(sha512)", true }, /* iwd, sha512hmac */ > > > + { "md4", true }, /* iwd */ > > > + { "md5", true }, /* iwd */ > > > + { "sha1", false }, /* iwd, iproute2 < 7.0 */ > > > + { "sha224", true }, /* iwd */ > > > + { "sha256", true }, /* iwd */ > > > + { "sha384", true }, /* iwd */ > > > + { "sha512", true }, /* iwd */ > > > + {}, > > In OpenWrt, https://gitlab.com/linux-afs/kafs-client and strongswan > > seem to be the other users of the user API. I haven't looked into what > > they need. > > [Please trim your replies, thanks!] Not sure what you mean. > > https://gitlab.com/linux-afs/kafs-client uses AF_ALG only for > "hmac(md5)", which I already put on the privileged allowlist due to iwd > also using it. So it would still work by default with the current > patch, unless it needs to use it unprivileged. > > (FWIW, a use of a single obsolete algorithm like this is also a good > candidate for just replacing with local code...) > > https://github.com/strongswan/strongswan already supports userspace > crypto libraries. Oh lovely. Looks like this needs fixing in OpenWrt. > > - Eric