From c0e33fe93cf6f9e54a1af759e8f46124e441f6e6 Mon Sep 17 00:00:00 2001 From: panzhe0328 Date: Mon, 27 Oct 2025 18:13:33 +0800 Subject: [PATCH] nscd: avoid assertion failure during persistent db check --- glibc.spec | 6 ++++- ...tion-failure-during-persistent-db-ch.patch | 27 +++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 nscd-avoid-assertion-failure-during-persistent-db-ch.patch diff --git a/glibc.spec b/glibc.spec index c685761..73a3e2c 100644 --- a/glibc.spec +++ b/glibc.spec @@ -62,7 +62,7 @@ ############################################################################## Name: glibc Version: 2.28 -Release: 118 +Release: 119 Summary: The GNU libc libraries License: %{all_license} URL: http://www.gnu.org/software/glibc/ @@ -186,6 +186,7 @@ Patch99: fix-global_max_fast-based-on-MIN_CHUNK_SIZE.patch Patch100: malloc_remove_unwanted_leading_whitespace_in_malloc_info.patch Patch101: malloc-Add-more-integrity-checks-to-mremap_chunk.patch Patch102: malloc-Fix-tcache-count-maximum.patch +Patch103: nscd-avoid-assertion-failure-during-persistent-db-ch.patch Provides: ldconfig rtld(GNU_HASH) bundled(gnulib) @@ -1305,6 +1306,9 @@ fi %endif %changelog +* Mon Oct 27 2025 panzhe - 2.28-119 +- nscd: avoid assertion failure during persistent db check + * Sat Oct 25 2025 panzhe - 2.28-118 - malloc: Fix tcache count maximum diff --git a/nscd-avoid-assertion-failure-during-persistent-db-ch.patch b/nscd-avoid-assertion-failure-during-persistent-db-ch.patch new file mode 100644 index 0000000..fd9e5b9 --- /dev/null +++ b/nscd-avoid-assertion-failure-during-persistent-db-ch.patch @@ -0,0 +1,27 @@ +From 61595e3d36ded374f97961503e843a314b0203c2 Mon Sep 17 00:00:00 2001 +From: Andreas Schwab +Date: Tue, 15 May 2018 14:42:37 +0200 +Subject: [PATCH] nscd: avoid assertion failure during persistent db check + +nscd should not abort when it finds inconsistencies in the persistent db. +--- + nscd/connections.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/nscd/connections.c b/nscd/connections.c +index 47fbb992..98182007 100644 +--- a/nscd/connections.c ++++ b/nscd/connections.c +@@ -304,7 +304,8 @@ static int + check_use (const char *data, nscd_ssize_t first_free, uint8_t *usemap, + enum usekey use, ref_t start, size_t len) + { +- assert (len >= 2); ++ if (len < 2) ++ return 0; + + if (start > first_free || start + len > first_free + || (start & BLOCK_ALIGN_M1)) +-- +2.33.0 + -- Gitee