From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f197.google.com (mail-oi1-f197.google.com [209.85.167.197]) (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 0B86F27FB1F for ; Sat, 25 Jul 2026 01:41:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.197 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784943706; cv=none; b=BRuLHvrfQjIyDpbEjba70JXMoS0S9R4ZEy4LHsBRX70tORNu3EUTI+YQpyRDGGCuenhA2hzjTNeutSI5n/Qdclp/TySHtJp9Y9I6W3VnzpNPK2UAYMRRWr+Y/qfcnFtQBWxgdB78eQko9MYKf0t6N+SaesK1K1ZnVU8Io7OgIbk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784943706; c=relaxed/simple; bh=36cY6mVASS2k3SYZyAo4jviOFRpY3eaNGwdkMIFCOYY=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=rzewN4KD6gIN/fN2apnLuF1KTMKVpouNGbZ7O/H3E+6CHpEerwydQqAv1G4q+SQe9bKK45sbin0ZdJ7yBH9VVItjfe8X++MU0tC4Bka8WF5NxO/HkY7p+20UZNYLbeajYE2gif8uay47ynmAm+wH+6wUMj+or4dgvH7lrwQDhyI= 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.167.197 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-oi1-f197.google.com with SMTP id 5614622812f47-4909b046dabso1446594b6e.0 for ; Fri, 24 Jul 2026 18:41:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784943704; x=1785548504; h=content-type:to:from:subject:message-id:in-reply-to:date :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=6JQEDO7E+tIdNcmjFg+5VDk1FSqdZUfhOy7NbiySQf0=; b=gKt+HtfmeUPBa55fPaCT3Rs1mX1sjsFSyHLYvxVHakLoWuC2o6QdVIL9E6C+C5KuRD xosR7Q9ZWi59ecfjYwrNnyBHukpp5bKsiFucP42B3p6hpqVl4m47KncSxDfnNlbmlxyU lZH2mJp6shXhvJm93c2EHZ6w4Hlclt7wDPHw28lt8PFxPojE0woU/Jhf9juL28xjjYsh iMY6dMrpUQoxi+twhsq6TKtliFWD3SP2tHc65AoTv/Pyro/Bxbt5TDYj/zeak8oC3ymV gMt8hPPUdNBbi1iPI1wbCJWMe29Vd0cfqUjxV6+/tBmsVb5GFJn+/pPCn01pTWCRJF6C uRIA== X-Gm-Message-State: AOJu0YxNDml3uDCxJ70Op9yXuSf/8ECncoxXTsLU5Ew8O7DYUQ2PsG5X moX2ShO8xI7YWKS1E11lycpoRoU+s52ZfdYXfRQAnIIKAaJUhQTwDmQZbd/MbNhT94J8lG5ghlv g6hkxMVhl3np8OzGKEw7Ok/OmAq1WyEDrQq8oW3CwDFRmIgmCHtPxYsTg3sk= 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:1b28:b0:493:e2bb:2eaf with SMTP id 5614622812f47-4ab6a1e8b37mr763752b6e.39.1784943703835; Fri, 24 Jul 2026 18:41:43 -0700 (PDT) Date: Fri, 24 Jul 2026 18:41:43 -0700 In-Reply-To: <6a62f788.dde6c935.cf6c8.000e.GAE@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <6a641457.a2ea2cc8.fbad6.000e.GAE@google.com> Subject: Forwarded: [PATCH] 9p: don't WARN_ONCE on racy symlink fid lookup failure 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] 9p: don't WARN_ONCE on racy symlink fid lookup failure Author: kartikey406@gmail.com #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master v9fs_init_request() WARN_ONCE()s when v9fs_fid_lookup() fails for a symlink read via the page cache. This is a benign TOCTOU race: a concurrent unlink()/rename() can remove the target between the walk finding the dentry and p9_client_walk() completing, so the lookup legitimately fails with -ENOENT (observed: dentry=/file0, err=-2). With panic_on_warn=1, this WARN escalates to a full kernel panic -- an unprivileged local DoS reachable by racing mount() against a concurrent unlink/rename. Return the error directly instead of WARN_ONCE(). Reported-by: syzbot+344c09c64fcd8d3d2782@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=344c09c64fcd8d3d2782 Signed-off-by: Deepanshu Kartikey --- fs/9p/vfs_addr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/9p/vfs_addr.c b/fs/9p/vfs_addr.c index 1ac0b3dcc077..121679488ab9 100644 --- a/fs/9p/vfs_addr.c +++ b/fs/9p/vfs_addr.c @@ -140,13 +140,16 @@ static int v9fs_init_request(struct netfs_io_request *rreq, struct file *file) goto no_fid; p9_fid_get(fid); } else if (S_ISLNK(rreq->inode->i_mode)) { + /* racing unlink/rename can make this fail with -ENOENT; + * that's expected, not a kernel bug, so don't WARN + */ dentry = d_find_any_alias(rreq->inode); if (!dentry) goto no_fid; fid = v9fs_fid_lookup(dentry); dput(dentry); if (IS_ERR(fid)) - goto no_fid; + return PTR_ERR(fid); } else { fid = v9fs_fid_find_inode(rreq->inode, writing, INVALID_UID, true); if (!fid) -- 2.43.0