Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp180690rwl; Wed, 4 Jan 2023 17:23:14 -0800 (PST) X-Google-Smtp-Source: AMrXdXtwdwz8mwsNtF/cKdk8J1mEgDTfwfpANi4VwTJarOHcdz2sOKDDwL1UC7OoB7Q/Wfu/lrGu X-Received: by 2002:a17:907:6f09:b0:7c1:277:cb00 with SMTP id sy9-20020a1709076f0900b007c10277cb00mr42476032ejc.23.1672881794657; Wed, 04 Jan 2023 17:23:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672881794; cv=none; d=google.com; s=arc-20160816; b=o+gJg0LrHQb90Km83aM452CZ/xa/7Sj7KochcKiyGxj3i2zvSl0nc89i7mX8nAjQny s00gvMPDPQjm7lijImqtzCEepZ9QMfngQAFIx5usmWwyg1fC96X83oVjhCvooZueRzgc dY6GX2a51PZude8Vo83sW3CTXxGHxmGhgt42D21arREPle89VyEBzH9iCHsfJ5yDcJ1E aIlKPGQ0QoSKSo0GRSW5vUd9p9NP9VGr8/SWD+jufkpz+CLWPTrPHKOe/VC2RrrtaidR rSe1TputKo/PPholpF4L3D0MuuDZ9ILMiZNnnYFaw1zlgrDHKlKeIgZ42nHNUDkEi4/K svsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=h4eXR7+DTXCTaYZ/SdHjg2xu1hwBwg3cWqSb9OuDM9Y=; b=i4SjDj0MbrAHR9tvHFlt8zkGIukDgliaWwhjpExeg141+cs/jWVN7o1PxyVFgOJpJm tj30ii9hsxKIbGYhgGOKJFE4ZMWb7F8ak3/gtKnBICvnCj5f7A1tFNDtusI8PGlLlXRa ylQTnbkxJZqhagFuchoTg9X95N+t4zCBqhtbkd5bw9On15UfJMP3Nqwvue3aNSF2HkUj BHgBGmEfV3yagcNkKxplqT1Xd+Vf2/O86QxLIw5RQ8zxKXzLzF0GLylMpz+oBHLOH/6r JbRqSnLfmifo0PXX0R208VCdW2VX6Zi/KGtFh6teNm39csHZhr6UjrhD20TU6miIVxRR 54Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dubeyko-com.20210112.gappssmtp.com header.s=20210112 header.b=RuWR1y5q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hv13-20020a17090760cd00b007c10b6790bfsi29916029ejc.68.2023.01.04.17.23.01; Wed, 04 Jan 2023 17:23:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@dubeyko-com.20210112.gappssmtp.com header.s=20210112 header.b=RuWR1y5q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235912AbjAEAh2 (ORCPT + 56 others); Wed, 4 Jan 2023 19:37:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235399AbjAEAhE (ORCPT ); Wed, 4 Jan 2023 19:37:04 -0500 Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20539B80 for ; Wed, 4 Jan 2023 16:37:03 -0800 (PST) Received: by mail-qt1-x834.google.com with SMTP id i20so28789958qtw.9 for ; Wed, 04 Jan 2023 16:37:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dubeyko-com.20210112.gappssmtp.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=h4eXR7+DTXCTaYZ/SdHjg2xu1hwBwg3cWqSb9OuDM9Y=; b=RuWR1y5qjlv+GrqbkjNVxnJ1b79YNDxZsoLwsEER/oFFJBQm5x6N9YstduZzZTb6Rm pGK1H1fm2x5F7gELgYGhzi7BuYAnEKvZrjR+ACIhtJ/5c45nyHeQ6tYXlnkNSPriDycX xzWbn4hDyZ9glm+F30XNjlcnEFGnrD0VhhtIoMqJhOccznsqLSvEj58av5OuRCjiNKJa i5fHnglchNjxLo+XCOSrsVIMEEcpgfQHaMEFVWYgZqSeGa7z1uToZeqW8E52S9DS2WjS z5+gpoqxe0oxAbByAKWECScZ2UoJwiCZUsNRUarxMQQwG8fhfqnfmUtzUPD9veXfJnI0 bkrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=h4eXR7+DTXCTaYZ/SdHjg2xu1hwBwg3cWqSb9OuDM9Y=; b=jo9ketILEG5owl98JIavapqZEk68oPHHwOQVWNVbwYsXJbou66cx/t6JBeASQa2VT+ bQocqux6qklXmq53Ed0mN2DPnyEVTh9vHjPESMB7/iZ/wJcBPXc7OM74sGWuDIheyugs qyF1+8tKcpfwV60z62Hsgd1vhABvQnbz7pH4MjDv8g1ESeolJDoaoFFI0JljZuk4XB6y VlIayjs75xtKBYxQBuzQ4iwqYkf3j48yzHK1YTA0EoOcHUot8p/i+RTTPwHP/ZyReFky wRBUFbE+o6u8yLGGCJ6YpQ14YyP0tOA09u26bwpjoFUFXasft4rTK7LI10cMlkJq2miN pLlA== X-Gm-Message-State: AFqh2kodYTRFUipnSDqgrEBI9+7/KZVAyRVd/6xItTLl7/TOPE/1uris huPdspLnU4ihnnrUzVf3uV4HLQ== X-Received: by 2002:ac8:7450:0:b0:3a7:e599:1ee0 with SMTP id h16-20020ac87450000000b003a7e5991ee0mr59001669qtr.63.1672879022216; Wed, 04 Jan 2023 16:37:02 -0800 (PST) Received: from smtpclient.apple (172-125-78-211.lightspeed.sntcca.sbcglobal.net. [172.125.78.211]) by smtp.gmail.com with ESMTPSA id g4-20020ac87744000000b003a7f597dc60sm20987642qtu.72.2023.01.04.16.36.59 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Jan 2023 16:37:01 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: [syzbot] [hfs?] WARNING in hfs_write_inode From: Viacheslav Dubeyko In-Reply-To: Date: Wed, 4 Jan 2023 16:36:51 -0800 Cc: Linus Torvalds , syzbot , Andrew Morton , christian.brauner@ubuntu.com, Damien Le Moal , Jeff Layton , Linux FS Devel , LKML , syzkaller-bugs@googlegroups.com, Matthew Wilcox , ZhangPeng , linux-m68k@lists.linux-m68k.org Content-Transfer-Encoding: quoted-printable Message-Id: <2575F983-D170-4B79-A6BA-912D4ED2CC73@dubeyko.com> References: <000000000000dbce4e05f170f289@google.com> <5f45bb9a-5e00-48dd-82b0-46b19b1b98a3@app.fastmail.com> To: Arnd Bergmann X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, > On Jan 4, 2023, at 2:33 PM, Arnd Bergmann wrote: >=20 > On Wed, Jan 4, 2023, at 20:06, Linus Torvalds wrote: >>=20 >> I suspect this code is basically all dead. =46rom what I can tell, = hfs >> only gets updates for >>=20 >> (a) syzbot reports >>=20 >> (b) vfs interface changes >=20 > 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. >=20 >> and the last real changes seem to have been by Ernesto A. Fern=C3=A1nde= z >> back in 2018. >>=20 >> 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 >>=20 >> + if (HFS_I(main_inode)->cat_key.CName.len > HFS_NAMELEN) >> + return -EIO; >>=20 >> but it's after hfs_find_init(), so it should actually have done a >> hfs_find_exit() to not leak memory. >>=20 >> So we should probably fix that too. >>=20 >> Something like this ENTIRELY UNTESTED patch? >>=20 >> Do we have anybody who looks at hfs? >=20 > 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. >=20 > Viacheslav, see the start of the thread at > https://lore.kernel.org/lkml/000000000000dbce4e05f170f289@google.com/ >=20 Let me take a look into the issue. Thanks, Slava.