Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2017787imm; Tue, 10 Jul 2018 11:40:58 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcdQCQ03H254Z0SyC4KkQnEWj25yoavsimhB9hpa5wxg2bF+YF5Qc0RphBq6boOHbc9r1ER X-Received: by 2002:a65:5c02:: with SMTP id u2-v6mr23677621pgr.304.1531248058472; Tue, 10 Jul 2018 11:40:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531248058; cv=none; d=google.com; s=arc-20160816; b=wc+NBGNT5Qf1H5rmydTIOTdh9b8NLwhrwCk5mWuIEDKWOJzovHEsWVdecHagnebmV3 hE14I8yHBlfdk2XCV+FE4LlEYJre2N6EvfnipVOaQGedjeYr/cDfyJv8tXb+fs/F24II WIwYwwTbUQN+OGWkzX7HQHE76mHofGEbrdgUsfFBSqT1RU8C+deEwXK23fJueUlg+zxn a/gV8bbTq0jb7mQdUuWNab4SRdv9PTmEQzLOEQXWR6aIQ3wjoUNHBL3TBIecvnhbRlVL cdPBtn2NI6mjhL2wd1b0QGgwvZDBRKb9C98ZA3abOvAKQRBP6lN2Dk5Iw84XtDvBeAh7 lvog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=ciozfUUkUw51HSO84bCd10JwCGYhqMKeeElqN44Mg8A=; b=LbrAHo9a1xdutFKpFHIgqJSGbyMajhopQxFrSnBlp/1t8OX+CZkoBDfm9n+jyNrc9d KFp9QhNQu2h5Ge3ma7/jImKHfw9aP55Gj7AiWHi5AlCr7Rv0niEF05+VJUEEE7iFH1rs XDPmHqGISCoy2JUaz6po4pcFIfgHmqHSxuX5GLmkqsdOnWvHwXry3FUHmOpTPg9pEcq0 01i1rvNgU4BUS7lJMFpbHruwOc9JX3A6yXmpiuGIMHC4CQDVxFYKhUVtLlKsygK8DsbF axHFrIS8docvQJEddp66H/0l3n2DfRJiqVIUeqbrZhcXEIxLoZ8H33z9m5xFTx6lxZwL K/gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gvT5LUy9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 78-v6si18182787pfb.204.2018.07.10.11.40.43; Tue, 10 Jul 2018 11:40:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gvT5LUy9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390188AbeGJSjC (ORCPT + 99 others); Tue, 10 Jul 2018 14:39:02 -0400 Received: from mail-qt0-f173.google.com ([209.85.216.173]:43261 "EHLO mail-qt0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389765AbeGJSjB (ORCPT ); Tue, 10 Jul 2018 14:39:01 -0400 Received: by mail-qt0-f173.google.com with SMTP id f18-v6so19219847qtp.10; Tue, 10 Jul 2018 11:38:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=ciozfUUkUw51HSO84bCd10JwCGYhqMKeeElqN44Mg8A=; b=gvT5LUy9/41c7ImMsse20iFWBg8jSgZybTngD+uo1/Sy7SPjzFKgAlrPV20s+5UA9z 6zswjLXsQnIRDSJCgDKwx5bn+Ge6aseCt6uE8tWG3klEZsRSUZuR0nhR7P0L9Y6j9uWK imeTZdtcU6y2lfVOvUX51WCXCrfqHPMF7/u3PwP3sLwvbUFOCCAdPZtbM/DO1Qqh+yo7 SMoGZYuzP7xa9SFZ4Cg5QTaV0kK96Sf9X8Z1jnvF5nyuollVLMU5Fxfj0ApQY2LYQ6nL 5YFAyctWPVVSzK74vQaPwkNl4c9FU1+2x7gDTLtSw1NT88apNvhsaBlZ3gNNSoTUMVep TwFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=ciozfUUkUw51HSO84bCd10JwCGYhqMKeeElqN44Mg8A=; b=VxZeWbV4QKeJTqciWo4eo//Nv8oi9kdlc6gJCDiMJtHNitIblyxEzXVqWKaBp8H/uz L0o0vcsbkQ7zDGvYBse/B6j4Mr6bu61NJdSIFQ2+/BYaVd8XC6lbO4O8fgjVtiY1lU+7 LEk/2wZTS6ZNljKdQcffjj0FP0ydo2KJTuGk+r7EVOP2aPuhV8IY/DU75jf/1aKAhHby 5VpIi4I43fGQtocNa/2Fd207gJ27nMxjN3PY3gAl3PlRmjcF2qbwTXdjxiJqqf748qRr nA0YJ8ng23JfqBt1vFED+bD8seklDyt8RxcpMJfR9HI3a1EdrA+Vg+6E96D9FgTSv/JB 7rLw== X-Gm-Message-State: APt69E1ruKKnbOQKuBwK4DJ/oJ/smHSbEJ2VxekonQD8UTjQoYq1bOE+ BaxJeBEDp2T2WNH1Gytnajk= X-Received: by 2002:a0c:f386:: with SMTP id i6-v6mr23009010qvk.100.1531247926065; Tue, 10 Jul 2018 11:38:46 -0700 (PDT) Received: from eaf ([181.47.179.0]) by smtp.gmail.com with ESMTPSA id h22-v6sm11091827qkj.84.2018.07.10.11.38.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Jul 2018 11:38:45 -0700 (PDT) Date: Tue, 10 Jul 2018 15:38:41 -0300 From: Ernesto =?utf-8?Q?A=2E_Fern=C3=A1ndez?= To: Anatoly Trosinenko Cc: pavel@ucw.cz, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Tetsuo Handa Subject: Re: Mounting corrupted HFS+ causes kernel NULL pointer dereference Message-ID: <20180710183839.abazeghy7he4v2ai@eaf> References: <20180603184955.zrowxp4y3ij66y5n@eaf> <20180608152557.GB11958@amd> <20180709203455.fbmx45ehrsj6yjzr@eaf> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 10, 2018 at 08:28:37PM +0300, Anatoly Trosinenko wrote: > Thank you, > > When applied this single patch on v4.18-rc4 and performed "echo > > /mnt/xyz" on hfsplus_16mb_hang image, I get about 14 pairs of lines > > hfsplus: unable to mark blocks free: error -5 > hfsplus: can't free extent > > Then `echo` exits with "No space left on device" error. Truncation does not return error codes in hfsplus, hence this weird "No space left" that comes from somewhere else. This should be fixed, but it's not as big an issue as the deadlock. Filesystems usually don't need to worry about protecting a crafted image from acting weird and causing damage to itself. >Then it > permits to perform `rm /mnt/xyz` and on `echo > /mnt/1` it responds > with no space left on device (but file *is* created and is cattable). > I don't know what is safer, but now it doesn't deadlock. :) Maybe it > is even worth to remount FS r/o, I don't know. (Please excuse me for > speculations) It's not strange that the /mnt/1 file could be created but not written to, since the first operation doesn't usually require allocating blocks. > > Thanks, > Anatoly OK, I'll take a look at the truncation error codes as soon as I'm done with the other deadlocks I found. It could take a while. Thanks for the testing. Ernest > пн, 9 июл. 2018 г. в 23:35, Ernesto A. Fernández > : > > > > On Tue, Jun 12, 2018 at 09:43:26PM +0300, Anatoly Trosinenko wrote: > > > And when I mount hfsplus_16mb_hang and perform `echo > /mnt/xyz`, it hangs. > > > > I just sent you a patch for this final report. Let me know if it works > > for you.