From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 538E4C53210 for ; Wed, 4 Jan 2023 22:34:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240543AbjADWeQ (ORCPT ); Wed, 4 Jan 2023 17:34:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240347AbjADWeP (ORCPT ); Wed, 4 Jan 2023 17:34:15 -0500 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 363864260E; Wed, 4 Jan 2023 14:34:13 -0800 (PST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id C324A5C00EA; Wed, 4 Jan 2023 17:34:10 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Wed, 04 Jan 2023 17:34:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1672871650; x= 1672958050; bh=GhHK13puG9rbbmVLp8YxJh1oi2E1z8eW7EP8WFvlzbE=; b=P 2rxRqqhwAYm82oHQZlx0eRquBq9ZbKOP3GKdJ563/G6LTzhGjkMpyJFzH5eUa/PX DaoAw+MhLf5t9tMzc9+3GHXPUF9LYA77CjlOcFP46f3PYJa2fy7U7HMVVgphFDwG /2QNvnirm2bH+0W8S3DJT1quRzS/nlbBZggpwkDPpCnOf76gYEEBn0HKaK/3s31u I1gLXMRob7wXikMCPXv5ZDFRimmLxTp8ZnnNq47QSeU3gr3Tcp0oxIwy9V383U2u aohzsLAqeKXo0Q9O1iKb4/s/upBfdrQxyQBLf19sBR7bdctl5vjxSwhcLjwlWivJ yTQ9nSFLzQyXM4p2VRBmg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1672871650; x= 1672958050; bh=GhHK13puG9rbbmVLp8YxJh1oi2E1z8eW7EP8WFvlzbE=; b=s XjvCay9qgfp5zZA/FK9sFizwgm3P949Px1iTHcIgW8gTVg86SVON5Wfbk9cu7P4h IufKBgZaD/y0adTibbCtd70bGu1wcKNqiggPDE8SZ3BfIz/ezIJLA7rXBpyO9lfm eM0GadwVZqDfSaDY/hwqpMYHohA8QlCgljo1xvKYbTRugVk4vk+dXit1lNVSqEDn +j+uLX8se25VVGGvly4Zz/t9lWJ3DUU+oxshdq8DGxmVjeMmORnRpkER5W+ftKTR I5ivgROXearuZrs3UY5aOwws/2XFAnKoJmvR2z8dH7IuwZJl7/3jMM4ZABFD5gxh e9zPd/1+v4UP3k/fKunug== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrjeejucetufdoteggodetrfdotffvucfrrh hofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgenuceurghi lhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurh epofgfggfkjghffffhvfevufgtgfesthhqredtreerjeenucfhrhhomhepfdetrhhnugcu uegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrghtthgvrh hnpefgkeeuleegieeghfduudeltdekfeffjeeuleehleefudettddtgfevueeffeeigeen ucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomheprghrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 9628CB60086; Wed, 4 Jan 2023 17:34:09 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1185-g841157300a-fm-20221208.002-g84115730 Mime-Version: 1.0 Message-Id: In-Reply-To: References: <000000000000dbce4e05f170f289@google.com> <5f45bb9a-5e00-48dd-82b0-46b19b1b98a3@app.fastmail.com> Date: Wed, 04 Jan 2023 23:33:50 +0100 From: "Arnd Bergmann" To: "Linus Torvalds" Cc: syzbot , "Andrew Morton" , christian.brauner@ubuntu.com, "Damien Le Moal" , jlayton@kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com, "Matthew Wilcox" , ZhangPeng , "Viacheslav Dubeyko" , linux-m68k@lists.linux-m68k.org Subject: Re: [syzbot] [hfs?] WARNING in hfs_write_inode Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Wed, Jan 4, 2023, at 20:06, Linus Torvalds wrote: > > I suspect this code is basically all dead. From what I can tell, hfs > only gets updates for > > (a) syzbot reports > > (b) vfs interface changes There is clearly no new work going into it, and most data exchange with MacOS would use HFS+, but I think there are still some users. > and the last real changes seem to have been by Ernesto A. Fern=C3=A1nd= ez > back in 2018. > > Hmm. Looking at that code, we have another bug in there, introduced by > an earlier fix for a similar issue: commit 8d824e69d9f3 ("hfs: fix OOB > Read in __hfs_brec_find") added > > + if (HFS_I(main_inode)->cat_key.CName.len > HFS_NAMELEN) > + return -EIO; > > but it's after hfs_find_init(), so it should actually have done a > hfs_find_exit() to not leak memory. > > So we should probably fix that too. > > Something like this ENTIRELY UNTESTED patch? > > Do we have anybody who looks at hfs? Adding Viacheslav Dubeyko to Cc, he's at least been reviewing patches for HFS and HFS+ somewhat recently. The linux-m68k list may have some users dual-booting old MacOS. Viacheslav, see the start of the thread at https://lore.kernel.org/lkml/000000000000dbce4e05f170f289@google.com/ Arnd