Files
gentoo/sys-apps/util-linux/files/util-linux-2.41.4-no-AF_ALG.patch
Sam James b513c7fb57 sys-apps/util-linux: disable AF_ALG (!) support in hardlink(1)
hardlink automagically uses AF_ALG if support exists in the kernel. AF_ALG
is buggy and on its way out.

This also exposed a kernel bug reported by Calvin Buckley <calvin@cmpct.info>
which Brad Spengler <brad.spengler@opensrcsec.com> helped debug and fix.

Bug: https://bugs.gentoo.org/973385
Bug: https://github.com/util-linux/util-linux/issues/4329
See also: https://github.com/util-linux/util-linux/pull/4334#issuecomment-4492009559
Signed-off-by: Sam James <sam@gentoo.org>
2026-05-20 21:50:04 +01:00

20 lines
690 B
Diff

Don't enable AF_ALG support:
* https://github.com/util-linux/util-linux/issues/4329
* https://github.com/util-linux/util-linux/pull/4334#issuecomment-4492009559
It's brittle and on its way out of the kernel. hardlink automagically using
it has triggered a kernel panic as well: https://sporks.space/2026/05/19/chasing-down-why-installing-the-kernel-segfaulted/
--- a/include/fileeq.h
+++ b/include/fileeq.h
@@ -10,10 +10,6 @@
#include <stdint.h>
#include <stdbool.h>
-#if defined(__linux__) && defined(HAVE_LINUX_IF_ALG_H)
-# define USE_FILEEQ_CRYPTOAPI 1
-#endif
-
/* Number of bytes from the beginning of the file we always
* compare by memcmp() */
#define UL_FILEEQ_INTROSIZ 32