From nobody Wed Aug 11 13:19:25 2021 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 073241758CB9 for ; Wed, 11 Aug 2021 13:19:26 +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 4Gl9QP6j1dz3C2P for ; Wed, 11 Aug 2021 13:19:25 +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 CE8D17DB8 for ; Wed, 11 Aug 2021 13:19:25 +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 17BDJPFL098174 for ; Wed, 11 Aug 2021 13:19:25 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 17BDJPAO098173 for bugs@FreeBSD.org; Wed, 11 Aug 2021 13:19:25 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 257768] Corrupt UDF disk image can cause crash when mounted. Date: Wed, 11 Aug 2021 13:19:25 +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: 13.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: rtm@lcs.mit.edu 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 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D257768 Bug ID: 257768 Summary: Corrupt UDF disk image can cause crash when mounted. Product: Base System Version: 13.0-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: rtm@lcs.mit.edu If a corrupt (or malicious) UDF disk contains root_icb.len -2032, udf_mountfs() ends up passing a size of zero to breadn_flags(), which causes it to return a bp with an unmapped b_data, which causes udf_mountfs()/udf_checktag() to pagefault. You can see this with the attached UDF image, using mdconfig -f bad-udf.iso mount_udf /dev/md0 /mnt which yields (on my amd64 13.0-RELEASE-p3 machine): panic: vm_fault_lookup: fault on nofault entry, addr: 0xfffffe0009cd8000 cpuid =3D 0 time =3D 1628673343 KDB: stack backtrace: #0 0xffffffff80c57515 at kdb_backtrace+0x65 #1 0xffffffff80c09ef1 at vpanic+0x181 #2 0xffffffff80c09d63 at panic+0x43 #3 0xffffffff80f289db at vm_fault+0x144b #4 0xffffffff80f274b1 at vm_fault_trap+0xb1 #5 0xffffffff8108b3b8 at trap_pfault+0x1f8 #6 0xffffffff8108a86d at trap+0x27d #7 0xffffffff810619a8 at calltrap+0x8 #8 0xffffffff80cdaa09 at vfs_domount+0x5e9 #9 0xffffffff80cd9c27 at vfs_donmount+0x8e7 #10 0xffffffff80cd9309 at sys_nmount+0x69 #11 0xffffffff8108babc at amd64_syscall+0x10c #12 0xffffffff810622ce at fast_syscall_common+0xf8 --=20 You are receiving this mail because: You are the assignee for the bug.=