From nobody Sun Apr 5 13:04:15 2026 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 21AEBECAAD8 for ; Wed, 14 Sep 2022 11:17:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229489AbiINLRX (ORCPT ); Wed, 14 Sep 2022 07:17:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229457AbiINLRT (ORCPT ); Wed, 14 Sep 2022 07:17:19 -0400 Received: from sender-of-o50.zoho.in (sender-of-o50.zoho.in [103.117.158.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EBC14D24D; Wed, 14 Sep 2022 04:17:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663154217; cv=none; d=zohomail.in; s=zohoarc; b=BJwEfHEXjRmXkFkHW+Om2xekj3PQzcIMUuwislfMvWQu9fzA4tgFJWYEmJMVbDniPhluuUjCcScGBZrJ89VHk1mhYtxa36Y2OcYuNgp/9f2LHgNtYGLXxQAS3/BFSINlssSO3SZto7acP1XcN/RkFX6i26yuDFUeSOK5SGqMGDw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.in; s=zohoarc; t=1663154217; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=+llC5L3toh5m6/IGcaq3njngvo8xvm7Ec+Uc9KcqTeM=; b=XOopyJWXFsVIZu9yxu905UBMM2nvyHpnl4CDtGH/h0lJV3VZQ5gLxwtkNdE0jjLUg/JT8VZBakNXYSJAE2zG90N0GFxy2TJmX8ZPmHygMYwWH9itWyv2qC53RxnQVXZksbX+NSfcSCEaPIjCI2RxOdJyknCnu4GYiPj86Tsjl74= ARC-Authentication-Results: i=1; mx.zohomail.in; dkim=pass header.i=siddh.me; spf=pass smtp.mailfrom=code@siddh.me; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1663154217; s=zmail; d=siddh.me; i=code@siddh.me; h=From:From:To:To:Cc:Cc:Message-ID:Subject:Subject:Date:Date:MIME-Version:Content-Transfer-Encoding:Content-Type:Message-Id:Reply-To; bh=+llC5L3toh5m6/IGcaq3njngvo8xvm7Ec+Uc9KcqTeM=; b=bRobQpH2xTOa2z5qKvwtR1SAvxlVlVypTbSu8XuKnhGq+8S8hA64iIm2+7nCF+4j eNRBQLVEMlivAIu7j/UXzR3NNbJJrWl+NlFVoagjt3ewUfNi5jCh18sgW3aQPJYN+o6 V6Ux/LjmYINQMhMRNFN1I5xrHaLlJ4ybU4gqXkrA= Received: from localhost.localdomain (43.241.144.117 [43.241.144.117]) by mx.zoho.in with SMTPS id 1663154216126366.814546035366; Wed, 14 Sep 2022 16:46:56 +0530 (IST) From: Siddh Raman Pant To: Konstantin Komarov Cc: ntfs3 , linux-kernel , syzbot+9d67170b20e8f94351c8@syzkaller.appspotmail.com, stable@vger.kernel.org Message-ID: <20220914111643.14411-1-code@siddh.me> Subject: [PATCH] ntfs3: Fix memory leak in ntfs_fill_super() Date: Wed, 14 Sep 2022 16:46:43 +0530 X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Mount options ptr wasn't freed before putting the superblock in ntfs_fill_super(), which resulted in a memory leak. Bug report: https://syzkaller.appspot.com/bug?id=3D332ba47915d0e39e94b42a62= 2f195f0804ecb67f Fixes: 9b75450d6c58 ("fs/ntfs3: Fix memory leak if fill_super failed") Reported-and-tested-by: syzbot+9d67170b20e8f94351c8@syzkaller.appspotmail.c= om Cc: stable@vger.kernel.org # 5.15 Signed-off-by: Siddh Raman Pant --- fs/ntfs3/super.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c index 47012c9bf505..c0e45f170701 100644 --- a/fs/ntfs3/super.c +++ b/fs/ntfs3/super.c @@ -1281,6 +1281,7 @@ static int ntfs_fill_super(struct super_block *sb, st= ruct fs_context *fc) * Free resources here. * ntfs_fs_free will be called with fc->s_fs_info =3D NULL */ + put_mount_options(sbi->options); put_ntfs(sbi); sb->s_fs_info =3D NULL; =20 --=20 2.35.1