From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17682 invoked by alias); 30 Oct 2019 13:06:53 -0000 Mailing-List: contact libc-stable-help@sourceware.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Subscribe: List-Archive: Sender: libc-stable-owner@sourceware.org Received: (qmail 17212 invoked by uid 89); 30 Oct 2019 13:06:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.3 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-18.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3 autolearn=ham version=3.3.1 spammy= X-Spam-Status: No, score=-18.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org X-Spam-Level: X-HELO: us-smtp-1.mimecast.com Received: from us-smtp-delivery-1.mimecast.com (HELO us-smtp-1.mimecast.com) (207.211.31.120) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 30 Oct 2019 13:06:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572440810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5nBMUo/2V/drjCi/K2jIOv3BsG549ZTRJHLHJ43NcSQ=; b=eUrtuU6Ou6vVMjjiZhcNTzTcKU8luRguZYEz9maUlgCviZ9uneysXg0G1jUMIXzwEBQO+g w/zQpPZi4g7D3OQU5sgF+au3K4h04RtxQPhhXMJCALDPYMo93oWiKNZCUxPincDDl9wmH2 p8INMYIJ0qxRVt27Oi63Cu0n+wOXJq4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-171-zrtyG8KDOyq_t_ny4OHprQ-1; Wed, 30 Oct 2019 09:06:45 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2F5B11800D55 for ; Wed, 30 Oct 2019 13:06:45 +0000 (UTC) Received: from oldenburg2.str.redhat.com (dhcp-192-230.str.redhat.com [10.33.192.230]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0491760BE0 for ; Wed, 30 Oct 2019 13:06:45 +0000 (UTC) Received: by oldenburg2.str.redhat.com (Postfix, from userid 1000) id 73EB581DF3BE; Wed, 30 Oct 2019 14:06:43 +0100 (CET) Date: Tue, 01 Jan 2019 00:00:00 -0000 To: libc-stable@sourceware.org Subject: [2.28 COMMITTED] nscd: avoid assertion failure during persistent db check User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Message-Id: <20191030130643.73EB581DF3BE@oldenburg2.str.redhat.com> From: Florian Weimer X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: zrtyG8KDOyq_t_ny4OHprQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2019-10/txt/msg00003.txt.bz2 From: Andreas Schwab nscd should not abort when it finds inconsistencies in the persistent db. (cherry picked from commit 61595e3d36ded374f97961503e843a314b0203c2) 2018-12-19 Andreas Schwab * nscd/connections.c (check_use): Don't abort on invalid len. diff --git a/nscd/connections.c b/nscd/connections.c index 47fbb9923a..9818200764 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 >=3D 2); + if (len < 2) + return 0; =20 if (start > first_free || start + len > first_free || (start & BLOCK_ALIGN_M1))