diff -Nur linux-6.6.43.orig/fs/binfmt_flat.c linux-6.6.43/fs/binfmt_flat.c --- linux-6.6.43.orig/fs/binfmt_flat.c 2024-07-27 11:34:11.000000000 +0200 +++ linux-6.6.43/fs/binfmt_flat.c 2024-08-09 09:34:47.857536277 +0200 @@ -72,8 +72,10 @@ #ifdef CONFIG_BINFMT_FLAT_NO_DATA_START_OFFSET #define DATA_START_OFFSET_WORDS (0) +#define MAX_SHARED_LIBS_UPDATE (0) #else #define DATA_START_OFFSET_WORDS (MAX_SHARED_LIBS) +#define MAX_SHARED_LIBS_UPDATE (MAX_SHARED_LIBS) #endif struct lib_info { @@ -880,7 +882,7 @@ return res; /* Update data segment pointers for all libraries */ - for (i = 0; i < MAX_SHARED_LIBS; i++) { + for (i = 0; i < MAX_SHARED_LIBS_UPDATE; i++) { if (!libinfo.lib_list[i].loaded) continue; for (j = 0; j < MAX_SHARED_LIBS; j++) {