From owner-freebsd-bugs@FreeBSD.ORG Sat Mar 21 01:33:53 2015 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA00AD84 for ; Sat, 21 Mar 2015 01:33:53 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75E8EBED for ; Sat, 21 Mar 2015 01:33:53 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id t2L1Xrd6017442 for ; Sat, 21 Mar 2015 01:33:53 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 198760] loader.conf(5)/check-password.4th(8): bootlock_password exceeding 16 characters creates unbootable system Date: Sat, 21 Mar 2015 01:33:53 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 9.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: dteske@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Mar 2015 01:33:53 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198760 Bug ID: 198760 Summary: loader.conf(5)/check-password.4th(8): bootlock_password exceeding 16 characters creates unbootable system Product: Base System Version: 9.2-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: dteske@FreeBSD.org When utilizing the bootlock_password feature of loader.conf(5) (see check-password.4th(8) for additional details) introduced in FreeBSD 9.2-RELEASE, if you set a password that exceeds 16 characters in length, the system cannot be booted since check-password.4th does a comparison between the full contents of $bootlock_password and the 16-byte-max user input. check-password.4th should instead truncate the loader.conf(5) variable contents to the maximum allowable length prior to comparison against user-input. This would allow a system to boot if the user is knowledgable of the input limit while the loader.conf setting exceeds maximum user-input -- the alternative being that you absolutely must use a LiveCD to recover from the situation of innocuously setting a value that is greater than 16 characters in length. NB: An enhancement coming soon will increase the maximum length to 255 characters which will make it less likely that folks will hit this -- but despite that, the solution of making a truncated comparison will alleviate the situation of making an unbootable system unintentionally. -- You are receiving this mail because: You are the assignee for the bug.