From patchwork Wed Dec 5 16:33:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Weber X-Patchwork-Id: 1008339 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=rockwellcollins.com Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43946V5mtxz9s9h for ; Thu, 6 Dec 2018 03:33:22 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 703A22DF59; Wed, 5 Dec 2018 16:33:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aXIaFpMfSxmU; Wed, 5 Dec 2018 16:33:16 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 5975522926; Wed, 5 Dec 2018 16:33:16 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 03CB61BF276 for ; Wed, 5 Dec 2018 16:33:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 015F387EC0 for ; Wed, 5 Dec 2018 16:33:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id N2-+3D9sTbQ9 for ; Wed, 5 Dec 2018 16:33:14 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from ch3vs02.rockwellcollins.com (ch3vs02.rockwellcollins.com [205.175.226.29]) by hemlock.osuosl.org (Postfix) with ESMTPS id 5D1A587EA5 for ; Wed, 5 Dec 2018 16:33:14 +0000 (UTC) Received: from ofwch3n02.rockwellcollins.com (HELO crulimr02.rockwellcollins.com) ([205.175.226.14]) by ch3vs02.rockwellcollins.com with ESMTP; 05 Dec 2018 10:33:14 -0600 X-Received: from largo.rockwellcollins.com (unknown [192.168.140.76]) by crulimr02.rockwellcollins.com (Postfix) with ESMTP id 2E3B46020F; Wed, 5 Dec 2018 10:33:13 -0600 (CST) From: Matt Weber To: buildroot@buildroot.org Date: Wed, 5 Dec 2018 10:33:11 -0600 Message-Id: <1544027592-35204-1-git-send-email-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 1.9.1 Subject: [Buildroot] [PATCH 1/2] system cfg: default mkpasswd to SHA 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: "Yann E. MORIN" MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This patch drops the comment about checking the C libraries version as they now all support it by default glibc 2.7+ uclibc (bdd8362a88 package/uclibc: defconfig: enable sha-256...) musl 1.1.14+ This patch updates the help text and changes the default mkpasswd method to SHA256 from MD5 Cc: Yann E. MORIN Signed-off-by: Matthew Weber --- system/Config.in | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/system/Config.in b/system/Config.in index 9e34f11..2123d33 100644 --- a/system/Config.in +++ b/system/Config.in @@ -61,7 +61,7 @@ endif choice bool "Passwords encoding" - default BR2_TARGET_GENERIC_PASSWD_MD5 + default BR2_TARGET_GENERIC_PASSWD_SHA256 help Choose the password encoding scheme to use when Buildroot needs to encode a password (eg. the root password, below). @@ -81,20 +81,12 @@ config BR2_TARGET_GENERIC_PASSWD_MD5 config BR2_TARGET_GENERIC_PASSWD_SHA256 bool "sha-256" help - Use SHA256 to encode passwords. - - Very strong, but not ubiquitous, although available in glibc - for some time now. Choose only if you are sure your C library - understands SHA256 passwords. + Use SHA256 to encode passwords which is stronger then MD5. config BR2_TARGET_GENERIC_PASSWD_SHA512 bool "sha-512" help - Use SHA512 to encode passwords. - - Extremely strong, but not ubiquitous, although available in - glibc for some time now. Choose only if you are sure your C - library understands SHA512 passwords. + Use SHA512 to encode passwords which is stronger then SHA256 endchoice # Passwd encoding From patchwork Wed Dec 5 16:33:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Weber X-Patchwork-Id: 1008338 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=rockwellcollins.com Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43946V0FKMz9s9G for ; Thu, 6 Dec 2018 03:33:21 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 7D75A87EA5; Wed, 5 Dec 2018 16:33:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Zfd0ABIKNCaB; Wed, 5 Dec 2018 16:33:20 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 138CB87EB8; Wed, 5 Dec 2018 16:33:20 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 3B9101BF276 for ; Wed, 5 Dec 2018 16:33:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 393A887EB8 for ; Wed, 5 Dec 2018 16:33:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xepRk07cum0J for ; Wed, 5 Dec 2018 16:33:17 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from da1vs01.rockwellcollins.com (da1vs01.rockwellcollins.com [205.175.227.27]) by hemlock.osuosl.org (Postfix) with ESMTPS id 95FEB87EA5 for ; Wed, 5 Dec 2018 16:33:17 +0000 (UTC) Received: from ofwda1n02.rockwellcollins.com (HELO crulimr02.rockwellcollins.com) ([205.175.227.14]) by da1vs01.rockwellcollins.com with ESMTP; 05 Dec 2018 10:33:16 -0600 X-Received: from largo.rockwellcollins.com (unknown [192.168.140.76]) by crulimr02.rockwellcollins.com (Postfix) with ESMTP id E0C0B6044B; Wed, 5 Dec 2018 10:33:15 -0600 (CST) From: Matt Weber To: buildroot@buildroot.org Date: Wed, 5 Dec 2018 10:33:12 -0600 Message-Id: <1544027592-35204-2-git-send-email-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1544027592-35204-1-git-send-email-matthew.weber@rockwellcollins.com> References: <1544027592-35204-1-git-send-email-matthew.weber@rockwellcollins.com> Subject: [Buildroot] [PATCH 2/2] system cfg: remove passwd MD5 format 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: "Yann E. MORIN" MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" As SHA256 is now default, removing weak MD5 option. C libraries now all support the SHA methods. glibc 2.7+ uclibc (bdd8362a88 package/uclibc: defconfig: enable sha-256...) musl 1.1.14+ One issue this would prevent is a host tool issue with a FIPS enabled system where weak ciphers/methods are disabled. The crypt(3) call checks /proc/sys/crypto/fips_enabled and would result in mkpasswd returning "crypt failed." Rather then create a host dependency check this patch removes the potential issue. Cc: Yann E. MORIN Signed-off-by: Matthew Weber Acked-by: "Yann E. MORIN" --- Config.in.legacy | 8 ++++++++ system/Config.in | 10 ---------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Config.in.legacy b/Config.in.legacy index 02321c8..d70654c 100644 --- a/Config.in.legacy +++ b/Config.in.legacy @@ -143,6 +143,14 @@ comment "----------------------------------------------------" endif ############################################################################### + +config BR2_TARGET_GENERIC_PASSWD_MD5 + bool "target passwd md5 format support has been removed" + select BR2_LEGACY + help + The default has been moved to SHA256 and all C libraries + now support that method by default + comment "Legacy options removed in 2018.11" config BR2_TARGET_XLOADER diff --git a/system/Config.in b/system/Config.in index 2123d33..9a87b1b 100644 --- a/system/Config.in +++ b/system/Config.in @@ -68,16 +68,6 @@ choice Note: this is used at build-time, and *not* at runtime. -config BR2_TARGET_GENERIC_PASSWD_MD5 - bool "md5" - help - Use MD5 to encode passwords. - - The default. Wildly available, and pretty good. - Although pretty strong, MD5 is now an old hash function, and - suffers from some weaknesses, which makes it susceptible to - brute-force attacks. - config BR2_TARGET_GENERIC_PASSWD_SHA256 bool "sha-256" help