From nobody Thu Mar 31 21:31:54 2022 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E93D81A48EE8 for ; Thu, 31 Mar 2022 21:31:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KTxMZ4bDnz4fk8 for ; Thu, 31 Mar 2022 21:31:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7EA5D2F518 for ; Thu, 31 Mar 2022 21:31:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 22VLVseC073568 for ; Thu, 31 Mar 2022 21:31:54 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 22VLVsWX073567 for bugs@FreeBSD.org; Thu, 31 Mar 2022 21:31:54 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 262964] msdosfs: Implement BPB sanity check and replace the existing boot signature check Date: Thu, 31 Mar 2022 21:31:54 +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: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: delphij@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org 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: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648762314; 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=ad/iKrvKQdEedTJTk7uSAA47sOonTdrezIWHqWoWZXs=; b=csGpPKu5KTAb96E4wjPpC2xYz/gMiwGBzc6PEcApUeEOfjP8xy35PLEJPiNYc5lbtaBUKQ KQPsQcoAptSb667MEGjBo2B7TRhRcO/QzZgc0MBJhzhv7fSHUQApI0/kqjaXLAGgdmP4cV zgoTplNNzINlB0PDdzDeO0sxl7yA7yK95RxuIH+vGOF0Ol/9QSbufeEBXxpt91PAksfYq9 FlznadIv67Bvyv7fVUC7E2udpGftMTAwSQkLVqW239joaC92CRBc8xByL6uIiviQ2MOM/A N3hlQKf8k12BN9an14xFnn0aX/ifykcHXNBp8fYhr1wv0I/rXhfIelfSG6pyZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648762314; a=rsa-sha256; cv=none; b=Kj60xVG3n9ciYfsUKyi20/n2K9JZyITsC8OhLw+NqjY9MJ0ZRRVEogevz/Hp8uHlDgPAbM gvp68x68k4khIxuwfdB7+jBjnfRjtbDk177HQpS/01MAzGNBFqGrN1BsFoCcnkN3kthwYQ v9uqJ/iglKpUMXSHcKo5rKWmb/bDRbgngoGkc/cwwUwIgBdsUzrCZbG/LWwumv+02PiO/p mztEkab5DrL4lafoYVWcHm3FeXHj8iZtXVpB3g1KJR6kf82/sAg7Rs1HwtR+k6PVGRDL5f YWo7ZdyBd4YypZPpzI468IcvjDDKaKluPOqrsGQFf+CTw09YpWktOr00aJPdcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D262964 Bug ID: 262964 Summary: msdosfs: Implement BPB sanity check and replace the existing boot signature check Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: delphij@FreeBSD.org Follow up of bug 262896 , recording in the ticket so it's not forgotten. Currently we have inconsistent checks across different components, some ins= ists 0xaa55 signature of boot sector, some are performing a subset of BPB sanity checks, etc. We should perform BPB sanity check for msdosfs related components. Some of preliminary ideas are found in https://reviews.freebsd.org/D34699 . In sum= mary we would want to validate some simple items like: - Check if the beginning byte was an x86 JMP instruction (e9 xx xx / eb xx 90); - Bytes per sector has to be power of two and between 512 and 4096 (512, 1= 024, 2048 or 4096). - Sector per cluster has to be power of two and non-zero (1, 2, 4, 8, etc.) - Total sectors has to be non zero. - Reserved sectors has to be non zero. - must have at least one FAT consistently across utilities and the kernel. --=20 You are receiving this mail because: You are the assignee for the bug.=