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 7C32DC433F5 for ; Wed, 16 Mar 2022 01:45:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347590AbiCPBq0 (ORCPT ); Tue, 15 Mar 2022 21:46:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245032AbiCPBqW (ORCPT ); Tue, 15 Mar 2022 21:46:22 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54DDA39BB1 for ; Tue, 15 Mar 2022 18:45:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id EE493B81A0C for ; Wed, 16 Mar 2022 01:45:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A26EC340E8; Wed, 16 Mar 2022 01:45:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647395106; bh=vpvK34JgD/Hy/2DxTDfEm3ZyCtrp5fVfbCVJ8tXBe64=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=btTYa+moocnIpxfd6M3ua1Ui/3qo56O73y3EK1nfHY6J0VlbzlrFeZEm1HkkkFf9A QQnyFsy+uPwFep4tJ6Y8wE6FEXPDwv2o2UiDo6WmGDlA3sDqRekXvMgHdC6XiBtpeS VANx2NwbeoEjQQiAeGf2gitivxQ3QHwUxMEYIF/Bof48OE3fVUr6ePEVG0nDy73twq nTnMppfZ/ZkDG6FnDhcn5w5Juf1aQc+9nF1WtzpP1lrICW5gUrompjZaax8KSbWZgH yq/TTDxp3KigoU+RyoWea27Nz+FluMsS1yT685nortjh9K0KPcJ93Fk0x0GdyN2i6f AYSocb0EQ7O8g== Message-ID: <871e075f-9c11-7baf-c3c4-8541fafa101b@kernel.org> Date: Wed, 16 Mar 2022 09:45:02 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.2 Subject: Re: [PATCH] fs: erofs: add sanity check for kobject in erofs_unregister_sysfs Content-Language: en-US To: Dongliang Mu , Gao Xiang Cc: Dongliang Mu , linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20220315132814.12332-1-dzm91@hust.edu.cn> From: Chao Yu In-Reply-To: <20220315132814.12332-1-dzm91@hust.edu.cn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/3/15 21:28, Dongliang Mu wrote: > From: Dongliang Mu > > Syzkaller hit 'WARNING: kobject bug in erofs_unregister_sysfs'. This bug > is triggered by injecting fault in kobject_init_and_add of > erofs_unregister_sysfs. > > Fix this by adding sanity check for kobject in erofs_unregister_sysfs > > Note that I've tested the patch and the crash does not occur any more. > > Signed-off-by: Dongliang Mu Reviewed-by: Chao Yu Thanks, 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BF316C433EF for ; Wed, 16 Mar 2022 01:45:15 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4KJClG0K36z308J for ; Wed, 16 Mar 2022 12:45:14 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=btTYa+mo; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2604:1380:4601:e00::1; helo=ams.source.kernel.org; envelope-from=chao@kernel.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=btTYa+mo; dkim-atps=neutral Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4KJClB4gC6z2xX8 for ; Wed, 16 Mar 2022 12:45:10 +1100 (AEDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 01529B81A0D; Wed, 16 Mar 2022 01:45:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A26EC340E8; Wed, 16 Mar 2022 01:45:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647395106; bh=vpvK34JgD/Hy/2DxTDfEm3ZyCtrp5fVfbCVJ8tXBe64=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=btTYa+moocnIpxfd6M3ua1Ui/3qo56O73y3EK1nfHY6J0VlbzlrFeZEm1HkkkFf9A QQnyFsy+uPwFep4tJ6Y8wE6FEXPDwv2o2UiDo6WmGDlA3sDqRekXvMgHdC6XiBtpeS VANx2NwbeoEjQQiAeGf2gitivxQ3QHwUxMEYIF/Bof48OE3fVUr6ePEVG0nDy73twq nTnMppfZ/ZkDG6FnDhcn5w5Juf1aQc+9nF1WtzpP1lrICW5gUrompjZaax8KSbWZgH yq/TTDxp3KigoU+RyoWea27Nz+FluMsS1yT685nortjh9K0KPcJ93Fk0x0GdyN2i6f AYSocb0EQ7O8g== Message-ID: <871e075f-9c11-7baf-c3c4-8541fafa101b@kernel.org> Date: Wed, 16 Mar 2022 09:45:02 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.2 Subject: Re: [PATCH] fs: erofs: add sanity check for kobject in erofs_unregister_sysfs Content-Language: en-US To: Dongliang Mu , Gao Xiang References: <20220315132814.12332-1-dzm91@hust.edu.cn> From: Chao Yu In-Reply-To: <20220315132814.12332-1-dzm91@hust.edu.cn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: linux-erofs@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development of Linux EROFS file system List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-erofs@lists.ozlabs.org, Dongliang Mu , linux-kernel@vger.kernel.org Errors-To: linux-erofs-bounces+linux-erofs=archiver.kernel.org@lists.ozlabs.org Sender: "Linux-erofs" On 2022/3/15 21:28, Dongliang Mu wrote: > From: Dongliang Mu > > Syzkaller hit 'WARNING: kobject bug in erofs_unregister_sysfs'. This bug > is triggered by injecting fault in kobject_init_and_add of > erofs_unregister_sysfs. > > Fix this by adding sanity check for kobject in erofs_unregister_sysfs > > Note that I've tested the patch and the crash does not occur any more. > > Signed-off-by: Dongliang Mu Reviewed-by: Chao Yu Thanks,