From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f69.google.com (mail-ot1-f69.google.com [209.85.210.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5BC5A30DD31 for ; Fri, 5 Dec 2025 12:43:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.69 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764938604; cv=none; b=daLBL+PdrQaxj9RmBlvihYmHDgKabN0nKxokvxPQ0Tmj+1zAU3pMMnQ2VwMowY7uGfz+wtezyBUdnITQ4LIqVuVSP5BJp0kPGmWaJFrWEwX0zYrgx9QFFQ1pWtDJpLuoev8rrzVCUMi7Qkz3kPLwHAIpI9d0ip8WuulkOU4XKYM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764938604; c=relaxed/simple; bh=j/HRba4GutObWTJNDUbR76QzGVT3J7RUknVk1vY0IOA=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=QJC6f5xAwUAx2tBgLpwj8bA6pc2s3ZgqBINd5ag0RBvIe+Iz8phXrU56xpZ607QReSqALNtQ0JkzI+e1BUx5YQLqUfLPndhu5vgy9NL2MMNgkJzGOhlrmuZNIsfC19Rj0kXs/DIc/Gnb6d9naKIaEJl/tdhs3HEcbH2meCN291c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.210.69 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-ot1-f69.google.com with SMTP id 46e09a7af769-7c76977192eso4394114a34.3 for ; Fri, 05 Dec 2025 04:43:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764938600; x=1765543400; h=to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ooXmwuhOS+0hhCcIcs9O6yc0XyK+YGqrK6pWmRAQRmo=; b=LidFwjl7glvYzD8Kf4prjxE8MrStPoyX9QPBSBTz9HEW+e55hsTA/oawXqTp50CNph BCz3gtKQTRspHnXGcQ7wVnzvOdj5d5Yfpab3G/1cjTSQj4O0Z/0jdqv48E9ehjXlRcK0 O21vvQZXkGn0SczI9sQx7ozqT80so7yZnuOClqd09URhKle9E3+gUn32eVkMWUK4Ss6l Yqm2CSehLuL4b7FPvE1NC5vsTWwEeq1M4g0pYe/EB2JobdFei0xOQBIdp3LMdd7SBW/k +17wxRTVH7D5Mwmxz866KmOQx9++nEPhtf2LTtVzp2j9xJR3iM/g7J4vyfylHJuY1sGo 0gQg== X-Gm-Message-State: AOJu0Yx0CajlCZfJP3plKpifce8ra/UfK4RcCp9JFaV7NS3MxfOxhopu e42Psj99GB8bmoJ6eH00WyuFU/yu6uXOuOpbpGT/nmPA/wBgvxwUVA7eTqt4H+VwurzsZcWb8H+ O1WJhl4iFhiYEfLr0D9L+HjEZYsuSQFLQnNSzfCG/zmyJrfXXQPMmmxDnKmY= X-Google-Smtp-Source: AGHT+IFl2DgkIP/f3SfEmGOnwiGZ5Q9QtgIGZiv5YFSzNBzm1yPQnVxja0OlcJFXNUusgYh+EAF2xz6cHH3gJy7xtpQjDb3sRsgl Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6808:2e4e:b0:450:46e:9ceb with SMTP id 5614622812f47-45379e1ca4bmr3886780b6e.55.1764938599975; Fri, 05 Dec 2025 04:43:19 -0800 (PST) Date: Fri, 05 Dec 2025 04:43:19 -0800 In-Reply-To: <69326fcf.a70a0220.d98e3.01e5.GAE@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <6932d367.050a0220.3a66f.0006.GAE@google.com> Subject: Forwarded: [PATCH] hfsplus: fix memory leak in hfsplus_fill_super() error path From: syzbot To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com. *** Subject: [PATCH] hfsplus: fix memory leak in hfsplus_fill_super() error path Author: kartikey406@gmail.com #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master When hfsplus_fill_super() fails, the sbi structure is freed but sb->s_fs_info is not set to NULL, leaving a dangling pointer. This can lead to memory leak as reported by syzbot. Set sb->s_fs_info to NULL after freeing sbi in the error path to ensure proper cleanup. Reported-by: syzbot+99f6ed51479b86ac4c41@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=99f6ed51479b86ac4c41 Signed-off-by: Deepanshu Kartikey --- fs/hfsplus/super.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c index 54e85e25a259..eb1b262be45e 100644 --- a/fs/hfsplus/super.c +++ b/fs/hfsplus/super.c @@ -630,6 +630,7 @@ static int hfsplus_fill_super(struct super_block *sb, struct fs_context *fc) unload_nls(sbi->nls); unload_nls(nls); kfree(sbi); + sb->s_fs_info = NULL; return err; } -- 2.43.0