From nobody Tue Oct 5 08:34:28 2021 X-Original-To: ports-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 5E2F712D0E91 for ; Tue, 5 Oct 2021 08:34:28 +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 4HNrVD1yRtz4XdP for ; Tue, 5 Oct 2021 08:34:28 +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 200A2146D for ; Tue, 5 Oct 2021 08:34:28 +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 1958YSnB016527 for ; Tue, 5 Oct 2021 08:34:28 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 1958YSP6016526 for ports-bugs@FreeBSD.org; Tue, 5 Oct 2021 08:34:28 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: ports-bugs@FreeBSD.org Subject: [Bug 258940] sysutils/fusefs-ntfs: ntfs-3g can seg-fault if the attribute MFT record is corrupt Date: Tue, 05 Oct 2021 08:34:28 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: rtm@lcs.mit.edu X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ports-bugs@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc flagtypes.name attachments.created 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: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D258940 Bug ID: 258940 Summary: sysutils/fusefs-ntfs: ntfs-3g can seg-fault if the attribute MFT record is corrupt Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: ports-bugs@FreeBSD.org Reporter: rtm@lcs.mit.edu CC: freebsd@dussan.org Flags: maintainer-feedback?(freebsd@dussan.org) CC: freebsd@dussan.org Created attachment 228456 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D228456&action= =3Dedit sysutils/fusefs-ntfs: an NTFS disk image whose corrupt attribute MFT record causes a seg-fault A corrupt MFT attribute record can cause ntfs_mount() to return a NULL volume pointer but leave errno =3D 0. This causes ntfs_open() to return zero (indicating no error) but leave ctx->vol =3D=3D NULL. main() then tries to use ctx->vol. I've attached a demo disk image: % gunzip ntx8.img.gz=20 % sudo mdconfig -f ntx8.img md0 % sudo ntfs-3g /dev/md0p1 /mnt Failed to open $AttrDef: No error: 0 Failed to mount '/dev/md0p1': No error: 0 Segmentation fault % ntfs-3g --version ntfs-3g 2017.3.23 external FUSE 29 % uname -a FreeBSD xxx 13.0-RELEASE-p4 FreeBSD 13.0-RELEASE-p4 #0: Tue Aug 24 07:33:27= UTC 2021=20=20=20=20 root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC= =20 amd64 The backtrace: 0x0000000000015c14 in main (argc=3D, argv=3D)= at ntfs-3g.c:4193 4193 if (!ctx->ro && NVolReadOnly(ctx->vol)) { --=20 You are receiving this mail because: You are the assignee for the bug.=