From nobody Tue Jun 16 09:59:23 2026 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (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 A878835FF5B for ; Sat, 18 Apr 2026 13:10:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776517827; cv=none; b=QDDXiFElOec0rTNtLC+aANi+XgD/90Hi/KqlaKHCtgB/YJNZQze+hb9gRd5dApYiL0QDVov7xJ51NC5aBaEEGQQ4vLk3JOCw6HRHMWF1hTF9uNQjyTYBrthmsg4+ciicvwh4qZ/CcUsgGe3LOy/iTiqWUnSDxaY1I315Tx63B4A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776517827; c=relaxed/simple; bh=uXt/VOf8yyaluKbmLkO8lvfoqNTGFoW9mEsrPMw4H6Q=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=XyovZn1eHF5MZohgRSXmyfEYhrPsDZtPbpFtTXadEm+q+MrzMy5e5OFawCTJaXBvMFqKrcQJ5JDdx0h5Htg4DvJ2o9SAmZLYYEKDVDXjxiRcydbTJ+GGDFmGy2Iydp6CX+r1CZ9z2PWp2lSvvbKHcWIYmVsjPURvG9XY2z/BkSs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=O+x+CTNQ; arc=none smtp.client-ip=209.85.221.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="O+x+CTNQ" Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-43cfde3c3f3so1645856f8f.3 for ; Sat, 18 Apr 2026 06:10:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776517824; x=1777122624; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=SxAbBQhuVYYVbWnBdbSRyoVN4oS1zGljw/YuQqcZBFk=; b=O+x+CTNQGcU7FV1igD09e410sjmKyt/DVmV1CGkq3wtgMd/XcKUR6RHuSm2NyHt6sc O6xNZpg3zJ41qzLZj8W4zHzkASwvtqHH0K4t2h+ZiK/QXli67eWcyr5htaEhvrRBIKbN LIZGpSqImS9U/UiGbGrRu7kAcAg4SzL9XzTt5DMiD+2rPZeT38bg+aEGhlD41VAtpZIk rRfLbduiJK6V8qqV7j+crZvyqXW5Pp9CiwH7kn3oqub1mo2SLsD/hYVji3fvxU0QJFGg r8yBT7Ofk5ShX8mBKcLoUeRTOHEoAQvpFYJsN9wK7zLKZ/1aL7RnQ3yINTm4KKSOXrp/ Fq6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776517824; x=1777122624; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=SxAbBQhuVYYVbWnBdbSRyoVN4oS1zGljw/YuQqcZBFk=; b=TEjN3SxIi+uwiD0g0XZ0zoQu0clkX0eXLZngdCcWp9xqS5IbH5VaQpuDJsm5yFXr82 N0NrrOCPUZEfnODSxFGHr2pzonDpQFP11wTmwWe90MA8PK2IE/Ai0qj/NVooHJkOOA16 aipWw9TAS8boG08MLy2nsVsQP5u4pgGh70O1KEFe6OcFyf18cwcfXNgr+XdehWetzH8B ROFMANnUTwSO5EJpM59dnXkpeG0M/Y6HVnW2NXGW8vALSZlUarjaNWu3v+v2ysV0kx4u 6HXuEfYdTgp+jLBkF7r+WNM4EfKG8rh6QwrgrFahKapZu+nA8gZdfViCEctnbD8EVTLZ P0uA== X-Gm-Message-State: AOJu0YxNDL0NcnHuSowsSF7o+zueLO/d1xmnNHn/RU3o24Act3L5yeOx ePqRbCoqPj2vWYBQao2Jax22cJB1OZfivO93XBn7KDdwP+fhNDDZISg= X-Gm-Gg: AeBDiesBTZ3SPzK4F7qQgnrCB+gxLRsCvyCgxAint9FNx6udFTnKNj31VR8/NC1ZT/t pZ2yYNzSpPFwklMSgjuenvgbNPAy8dLvAa9+Fb4vo5HggLbhjiUXBcSEl7VwUr3+O+2V1iCQVEI 1PoiKzL5KvCOLCthmcxgx78IhJp8WuFdFbFV+bTt0BffG0PRjoEsCsryoNntc0I1+ydq7ApTzUv mvkrGc+6nVVTV/241i0nzIxnRDebY7TAjEU8heElK4wC0FJz4HUWNkPZtQXNWkcCqcvo6JCsgO2 oSq5flGJjG2sBG1vwBKQHotRH4O5KtCC2tbSqkc5VkFl6pldujYNqWs4spA5Q+ZPx+9BUsdDTyN /QpK++gSAt6ehy9fuQ15VapUsnoW1Y+REyAZachKX5cc/KgEzTiTU5/w0l2YCrakVyOD/YMhsZV qLHo6eZP/YTw0OsQ== X-Received: by 2002:a5d:5f47:0:b0:43b:998c:9bbe with SMTP id ffacd0b85a97d-43fe3dd3963mr10574493f8f.13.1776517823852; Sat, 18 Apr 2026 06:10:23 -0700 (PDT) Received: from debian.. ([2001:41d0:303:db6b::]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43fe4e46471sm11891288f8f.28.2026.04.18.06.10.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Apr 2026 06:10:23 -0700 (PDT) From: Tristan Madani To: akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, syzbot+93f4402297a457fc6895@syzkaller.appspotmail.com Subject: [PATCH] hfsplus: fix uninit-value in hfsplus_rename_cat Date: Sat, 18 Apr 2026 13:10:22 +0000 Message-ID: <20260418131022.1042948-1-tristmd@gmail.com> X-Mailer: git-send-email 2.47.3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Tristan Madani hfsplus_rename_cat() uses subfolder counts from the on-disk record without zero-initializing the destination buffer when the else branch is taken. This leads to KMSAN-detected use of uninitialized memory. Zero-initialize the relevant fields in the else branch to prevent reading uninitialized data. Reported-by: syzbot+93f4402297a457fc6895@syzkaller.appspotmail.com Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Signed-off-by: Tristan Madani --- fs/hfsplus/inode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c index d05891ec492e3..356847ab3abf2 100644 --- a/fs/hfsplus/inode.c +++ b/fs/hfsplus/inode.c @@ -592,6 +592,8 @@ int hfsplus_cat_read_inode(struct inode *inode, struct = hfs_find_data *fd) if (folder->flags & cpu_to_be16(HFSPLUS_HAS_FOLDER_COUNT)) { HFSPLUS_I(inode)->subfolders =3D be32_to_cpu(folder->subfolders); + } else { + HFSPLUS_I(inode)->subfolders =3D 0; } inode->i_op =3D &hfsplus_dir_inode_operations; inode->i_fop =3D &hfsplus_dir_operations; --=20 2.47.3