From patchwork Fri Feb 26 23:13:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Korsgaard X-Patchwork-Id: 1445115 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=YEUZ4jAn; dkim-atps=neutral Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DnQSX5fxQz9sCD for ; Sat, 27 Feb 2021 10:13:29 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 90CDD433E6; Fri, 26 Feb 2021 23:13:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gymt1XuTOu9I; Fri, 26 Feb 2021 23:13:26 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id DAB7C4338E; Fri, 26 Feb 2021 23:13:25 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 0A2061BF616 for ; Fri, 26 Feb 2021 23:13:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id ED1274338E for ; Fri, 26 Feb 2021 23:13:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2y-Zaouze5Vf for ; Fri, 26 Feb 2021 23:13:23 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) by smtp2.osuosl.org (Postfix) with ESMTPS id E2BD943248 for ; Fri, 26 Feb 2021 23:13:22 +0000 (UTC) Received: by mail-ed1-f49.google.com with SMTP id d13so7882034edp.4 for ; Fri, 26 Feb 2021 15:13:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=IjdoscKChq6bzhWf2X1eqUUIdxtLZDRq4PYAQOitm28=; b=YEUZ4jAnK69+lgG7kkdNBTxcLdRot3Zv63bnk1PRdTGkSIhr3qOURo3It9aYBOuivW 86k9hMlxeBIiDZX8IXCRKNzXRRDZcyQmmekYBQ5S7jVxCiPF5p/oDX7jqeVHmS9jhkOC vUTKF432CMud9cro9R/VDdt0yFzP3f4JBMVn1IZ8zGWn7efFDmNMn7YxNcYaxgQjUOPj oCEH5LYu1PNkUy9nbH49EVMk5mwDi2zHfCQ+OErij/X4KZePdzvzk5z+n7NuaJm7NCgR WixD7al4ec27OVMXU/el7budk7lJ4iGG65s+mNg9MYM59EJlZFmAV6tUVmpiqGpz1wyZ kIrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=IjdoscKChq6bzhWf2X1eqUUIdxtLZDRq4PYAQOitm28=; b=setAp5cHp6OTXsqNAztXuZH+Cf5omRWRVxYLmpseDL5RPVQe36Xbqjx7/N7HNXEGzL AgbpMl+A3EOqiVd9P6cAB0CmE12a2WcWQUOhzqMOjq5ufzHyACGauJJgrK4T2tBrUkPi EyJQmtPDVOo25HNWRqurdLZUipeDRox2SaMtLYq3MQMpGshs6H6XqgvDGfjYY6ymFlTm q64Lbz0XaSAVgb4kW/pq6qOVDrkj4RmTD79jF36ZYAMu7nX4AcDmMp9vvjUhHf5GQWDT ELn8GLT5KuhaU/vqZSMEyXc+1F8Rdlqj4y8SZ4DrWTWa0sOrHCs193tI1154j/nmaoRM E4ig== X-Gm-Message-State: AOAM532MkXb+eaSXGCk0v/gBvG+ZBArzm5Bmj3vdqFbzfUfhnw3aqE2K dTB6yysj9vCsIcr7xcdeVFBMmJUrcIw= X-Google-Smtp-Source: ABdhPJxm00LCQBq3FQbcQuU8DOdUqEgF+nVjDRS+Whmn2KEFb9fCbM6N5rLGdqUllbUMEFgizIM+bA== X-Received: by 2002:aa7:c95a:: with SMTP id h26mr5937037edt.166.1614381200974; Fri, 26 Feb 2021 15:13:20 -0800 (PST) Received: from dell.be.48ers.dk (d51A5BC31.access.telenet.be. [81.165.188.49]) by smtp.gmail.com with ESMTPSA id 35sm6876932edp.85.2021.02.26.15.13.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Feb 2021 15:13:20 -0800 (PST) Received: from peko by dell.be.48ers.dk with local (Exim 4.92) (envelope-from ) id 1lFmIQ-0005bL-U3; Sat, 27 Feb 2021 00:13:18 +0100 From: Peter Korsgaard To: buildroot@buildroot.org Date: Sat, 27 Feb 2021 00:13:17 +0100 Message-Id: <20210226231318.21482-1-peter@korsgaard.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] package/openldap: add upstream security fix for CVE-2021-27212 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Bender Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" In OpenLDAP through 2.4.57 and 2.5.x through 2.5.1alpha, an assertion failure in slapd can occur in the issuerAndThisUpdateCheck function via a crafted packet, resulting in a denial of service (daemon exit) via a short timestamp. This is related to schema_init.c and checkTime. For more details, see the bugtracker: https://bugs.openldap.org/show_bug.cgi?id=9454 Signed-off-by: Peter Korsgaard --- ...TS-9454-fix-issuerAndThisUpdateCheck.patch | 26 +++++++++++++++++++ package/openldap/openldap.mk | 3 +++ 2 files changed, 29 insertions(+) create mode 100644 package/openldap/0005-ITS-9454-fix-issuerAndThisUpdateCheck.patch diff --git a/package/openldap/0005-ITS-9454-fix-issuerAndThisUpdateCheck.patch b/package/openldap/0005-ITS-9454-fix-issuerAndThisUpdateCheck.patch new file mode 100644 index 0000000000..a611b9ff59 --- /dev/null +++ b/package/openldap/0005-ITS-9454-fix-issuerAndThisUpdateCheck.patch @@ -0,0 +1,26 @@ +From 9badb73425a67768c09bcaed1a9c26c684af6c30 Mon Sep 17 00:00:00 2001 +From: Howard Chu +Date: Sat, 6 Feb 2021 20:52:06 +0000 +Subject: [PATCH] ITS#9454 fix issuerAndThisUpdateCheck + +Signed-off-by: Peter Korsgaard +--- + servers/slapd/schema_init.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/servers/slapd/schema_init.c b/servers/slapd/schema_init.c +index 31be1154e..8b1e25539 100644 +--- a/servers/slapd/schema_init.c ++++ b/servers/slapd/schema_init.c +@@ -3900,6 +3900,8 @@ issuerAndThisUpdateCheck( + break; + } + } ++ if ( tu->bv_len < STRLENOF("YYYYmmddHHmmssZ") ) return LDAP_INVALID_SYNTAX; ++ + x.bv_val += tu->bv_len + 1; + x.bv_len -= tu->bv_len + 1; + +-- +2.20.1 + diff --git a/package/openldap/openldap.mk b/package/openldap/openldap.mk index b4c06d8640..ec11e4fa7d 100644 --- a/package/openldap/openldap.mk +++ b/package/openldap/openldap.mk @@ -13,6 +13,9 @@ OPENLDAP_CPE_ID_VENDOR = openldap OPENLDAP_INSTALL_STAGING = YES OPENLDAP_DEPENDENCIES = host-pkgconf +# 0005-ITS-9454-fix-issuerAndThisUpdateCheck.patch +OPENLDAP_IGNORE_CVES += CVE-2021-27212 + ifeq ($(BR2_PACKAGE_OPENSSL),y) OPENLDAP_TLS = openssl OPENLDAP_DEPENDENCIES += openssl