From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oo1-f71.google.com (mail-oo1-f71.google.com [209.85.161.71]) (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 CADBF3AF654 for ; Fri, 17 Apr 2026 10:12:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.71 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776420738; cv=none; b=bTn87jrdAA/fAY9FrSAakdgj21gaS5N3onyfq3SB9/zA0MT+44HiOcQu2GFGKTn7ieCZg6PkGCoDVIIEG53cKgbE2azGhDvFGncHOLBjg+prRkIM1jVKdK231pz79K/6jBt6GtyeJZusCsV93fm+bJ+R1SEekpPS36gmkAILVuI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776420738; c=relaxed/simple; bh=DtnAXAd1LhE8S4u1sElNUYAjw/AN7x2S9f95ZoCfPB4=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=WufKt4cHJ9xDvBikGIXWEAUQ4zHT1lUJqGtt/EhfmRg6iH8fVZgF7Ruvl0uT4md5iKYMHBIJDlqAaR1tZinadA2EHonKq0yKC1zo9QnvuEGz0uDNwxDY69wpQ4XS4nmt0hGHd9lZobvoo93yoSRl1Vvc7ZBIGJ6xQ/efXhqqI7I= 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.161.71 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-oo1-f71.google.com with SMTP id 006d021491bc7-688c232dd72so711730eaf.1 for ; Fri, 17 Apr 2026 03:12:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776420736; x=1777025536; 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=O01uoSViByEM3l3LvK/8fR7uX19Zv2Idb6kwoLE2n2k=; b=Kov2mgBdB1/hjhnJsiIcUfr2HDcs70PwtjQm7JvSJ+tcvAgLpAFur2OFh+MEo/G3cv x+kwkXhdb+8yt8p4cZ9DFSBSwJE4cdRZyscD02OF8C2j1W8Znwgr7m2kNprcr0SFYGlz KjTZjC76BWb8rSU9rdmw/WKOh77heG2fLNJq2KnJOg1u3vorc+x8Ub1QW9v4D1R9M+q+ jRazZCXn89+4wJJ13L97pcPUzbYbnRdpe1BtoXK076wg8PPamhO4eEkXWOc/Ev14p9Ba RpB0lgI+eMY98BOHGajqEXsQjcGSjhr+8RsuUW8nuUgRxd+PaJK8otox/6eVDCrELC0u LS7A== X-Gm-Message-State: AOJu0YxOxkkRcbEcBnC7zLe97HQGuMGo4owdUyEcS/MlYb/pTCv/468T mj+qiUEmLBHmgQllxUh4JHGOJsZTOzF1RPKEjDqekhP42nuAgKbcbfjqAz8DGw1n8/1mJS92xFS VJdK65BnIdewZscRQ84AO7+H1uRvRXf7hYPjIbgM30ZQhUqmdG+DmSIUj9Cs= 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:4b8f:b0:684:2b28:f9a6 with SMTP id 006d021491bc7-69462f451a4mr1152928eaf.58.1776420735923; Fri, 17 Apr 2026 03:12:15 -0700 (PDT) Date: Fri, 17 Apr 2026 03:12:15 -0700 In-Reply-To: <683ea90b.a00a0220.d8eae.0060.GAE@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <69e2077f.050a0220.1de265.000e.GAE@google.com> Subject: Forwarded: [PATCH] udf: propagate iteration error from udf_expand_dir_adinicb() 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] udf: propagate iteration error from udf_expand_dir_adinicb() Author: tristmd@gmail.com From: Tristan Madani #syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master udf_expand_dir_adinicb() copies inline directory data into a newly allocated block and then re-iterates the directory entries to fixup tag locations. If the iteration fails (e.g. due to I/O error reading the new block or corrupted on-disk data), the function hits a WARN_ON_ONCE() and silently returns success. On a crafted UDF image this WARNING fires reliably because the underlying block read fails, causing udf_fiiter_init() or udf_fiiter_advance() to return -EFSCORRUPTED. Fix this by removing the WARN_ON_ONCE() and propagating the error code to the caller instead, so that filesystem corruption is handled gracefully rather than triggering a kernel warning. Fixes: a27b2923de7e ("udf: Move udf_expand_dir_adinicb() to its callsite") Reported-by: syzbot+969e250fc7983fc7417c@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=969e250fc7983fc7417c Cc: stable@vger.kernel.org Signed-off-by: Tristan Madani --- fs/udf/namei.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/fs/udf/namei.c b/fs/udf/namei.c --- a/fs/udf/namei.c +++ b/fs/udf/namei.c @@ -206,15 +206,11 @@ static int udf_expand_dir_adinicb(struct inode *inode, udf_pblk_t *block) else impuse = NULL; udf_fiiter_write_fi(&iter, impuse); } brelse(dbh); - /* - * We don't expect the iteration to fail as the directory has been - * already verified to be correct - */ - WARN_ON_ONCE(ret); udf_fiiter_release(&iter); - return 0; + return ret; } static int udf_fiiter_add_entry(struct inode *dir, struct dentry *dentry, -- 2.39.5