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 64FEA37DEAB for ; Sat, 18 Apr 2026 13:39:38 +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=1776519579; cv=none; b=mEILS9Z3izwZb2xeUHT2Bpd22fIIhSA5PyIEUp2HfRoR4PJ4nrJsSJFg+E/+2xHpNHqQ3eVyZ0Msds273NAVxfX+OpuWPmPzKP8iNhmTTxmKk1+fLcCRskPqoAwpRaFzLYlAglgJtyirdZFJudsDcIDH/d4FvfkNiCuysQqUXx0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776519579; c=relaxed/simple; bh=Y4RttPR7t+Im/umhZCffup85FEX4H18+0xiMF4haNiQ=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=bAnu8xTwilI0WO9l1qCJpS6P1d9epB2+ea0YzMcpax8EMZolh8vSo6kQ/M2FpsIBmQt4f5lGNoinf40Ig7H6zf2uhXWWv0Kz8QOPnxf8Gb1tcAxS8FWgP5OBxklXNgFn/6gpCPNwJ59Vy1In2CugTw7P6A/jgqNEqvvmNWyzPmo= 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-7dbd60b7ecbso3860324a34.1 for ; Sat, 18 Apr 2026 06:39:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776519577; x=1777124377; 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=kr5bNVTzLK18GE5FpN6WSgXp6X8wqCE+s+sclH6aXsA=; b=NWcW2dFHX2g8ZHEaGsaZYEVeAGIv/4cBZEzzUt7G9SCXD5Ep5rWrlk2gW6ZuuGif5C ny+LnfP/gP1DD2oBaxejzyaDtiuLpULBVJaUMEOX95HaLGbQRX9v+7R+FsqfXYTNK/Mu wyAdq513irJA2SbyVmRzaC2ZtYOvrbauS/7weM56qjLjQI5aFPWZjz9fysJeVJu1dTvM zSqlxiLGnF7APHMdHVEaYOir5sqjBwNIt5njjmnNZ51GFdY3M/8ErQ05XlASOsJXbEVX +Jhcvyi3PfYEdva8m9CDWvRzr0u+ImNZLW+FpoRnPloHqKQTJkpRuCzk4/Y3rJ8vS9aC r8CA== X-Gm-Message-State: AOJu0YyXiX1KOhIFHd+aleJrBl0taGicUR9E9M9ltVhJQFW/9FWU7R54 AMT7n6WKhgqqXE+MnEPW84ALgyPphhBt+TTkYI0s6aePdXFluJ77egH20CfqtyDkHKqXEPmv0hf joKo5RnSXHTId4MkRVoP9teOL3CBVP2IWhO99493Jn8f/C8zxPTbH7VEIxkw= 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:6820:2015:b0:692:a19b:af66 with SMTP id 006d021491bc7-69462f0bcddmr4054696eaf.52.1776519577433; Sat, 18 Apr 2026 06:39:37 -0700 (PDT) Date: Sat, 18 Apr 2026 06:39:37 -0700 In-Reply-To: <69decbd0.a00a0220.468cb.006b.GAE@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <69e38999.050a0220.24bfd3.000a.GAE@google.com> Subject: Forwarded: Re: [syzbot] [hfs?] KMSAN: uninit-value in hfs_bnode_read_u16 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: Re: [syzbot] [hfs?] KMSAN: uninit-value in hfs_bnode_read_u16 Author: tristmd@gmail.com #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master >>From fa9693d02a6d2e2fda72504085400c761d5eec1f Mon Sep 17 00:00:00 2001 From: Tristan Madani Date: Sat, 18 Apr 2026 13:39:03 +0000 Subject: [PATCH] hfsplus: zero-initialize buffer in hfs_bnode_read hfs_bnode_read() can return early without initializing the output buffer when the offset is invalid or the requested length is corrected to zero by check_and_correct_requested_length(). Callers such as hfs_bnode_read_u16() pass stack-allocated buffers and use the result unconditionally, leading to KMSAN uninit-value reports. Rather than initializing at each individual call site, zero the buffer at the start of hfs_bnode_read() before any validation checks. This ensures the buffer is always in a known state regardless of which early-return path is taken. Reported-by: syzbot+217eb327242d08197efb@syzkaller.appspotmail.com Tested-by: syzbot+217eb327242d08197efb@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=217eb327242d08197efb Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Signed-off-by: Tristan Madani --- fs/hfsplus/bnode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/hfsplus/bnode.c b/fs/hfsplus/bnode.c index f8b5a8ae58ff5..14d1af2c7ba93 100644 --- a/fs/hfsplus/bnode.c +++ b/fs/hfsplus/bnode.c @@ -25,6 +25,8 @@ void hfs_bnode_read(struct hfs_bnode *node, void *buf, u32 off, u32 len) struct page **pagep; u32 l; + memset(buf, 0, len); + if (!is_bnode_offset_valid(node, off)) return; -- 2.47.3