From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from r3-17.sinamail.sina.com.cn (r3-17.sinamail.sina.com.cn [202.108.3.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E6E53397B0B for ; Sat, 30 May 2026 09:52:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.108.3.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780134745; cv=none; b=Sg7QvMsG/YINxIdWBBDg/2ecvO7cg6vMw09n2aM96cHF/wKRya4ClHTz2wwYs5aKPzGfYbyBj1n/DttAJSmyryu+6ue8XxjGmRp0nW2HOqrmPAXSR8AGNwp5I8FWV1FvDe2O1d4gPLXI+wS0uiEsy1t5/6vBvSvAQnjw6gl5pyo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780134745; c=relaxed/simple; bh=j/FAuf+cENBAu0GVmxBdhgpM3kORm7gzro2s7vv6060=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kASiAdHtePoxrV18jFqIyc3hzHLVP3nMJrz8+Jfa+7xZ9PeIvKAHIfffmmbIhCQaV2zi84ZOzt5gNkCZ5ZvIj/OnJWM+3oCfJrlwrcX3uv/a5Fenz13hiLNPtNULFc9X8USH8ERsoQMO3p8xP0fp7kTiKnyam5/Zzzoq+99FKDc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sina.com; spf=pass smtp.mailfrom=sina.com; dkim=pass (1024-bit key) header.d=sina.com header.i=@sina.com header.b=RtTWce6z; arc=none smtp.client-ip=202.108.3.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sina.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=sina.com header.i=@sina.com header.b="RtTWce6z" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sina.com; s=201208; t=1780134741; bh=CTH9l+n3AGP9bCa4gQNT0rh+LmFlfh9XBWeT3wsc+es=; h=From:Subject:Date:Message-ID; b=RtTWce6z0TUVWKf2QjGb1VYqfHBwT5d/Fjqn34EFnF5WWaYGiWt1O98qpLGpZxEq8 ptbc2Lm9UNDnzkntkinG4KGe/CAG/UXCuPIyMiOnFzoIG+uX/yQ3r4pog5wK9RophG N303Y5AaQ5W+SZE6TN0ySWPXpZ1CIlWTXgCzDJ7g= X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([114.249.62.144]) by sina.com (10.54.253.34) with ESMTP id 6A1AB34900006F8D; Sat, 30 May 2026 17:52:11 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com Authentication-Results: sina.com; spf=none smtp.mailfrom=hdanton@sina.com; dkim=none header.i=none; dmarc=none action=none header.from=hdanton@sina.com X-SMAIL-MID: 1417736291939 X-SMAIL-UIID: 34F29EFD0C1A496280D9651842E21CAA-20260530-175211-1 From: Hillf Danton To: syzbot Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [lsm?] KASAN: slab-use-after-free Read in security_inode_follow_link Date: Sat, 30 May 2026 17:51:57 +0800 Message-ID: <20260530095200.1318-1-hdanton@sina.com> In-Reply-To: <6a19f098.abb04025.19af7b.0004.GAE@google.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit > Date: Fri, 29 May 2026 13:01:28 -0700 [thread overview] > Hello, > > syzbot found the following issue on: > > HEAD commit: eb3f4b7426cf Merge tag 'nfsd-7.1-2' of git://git.kernel.or.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=17dae52e580000 > kernel config: https://syzkaller.appspot.com/x/.config?x=8118209836970b54 > dashboard link: https://syzkaller.appspot.com/bug?extid=0962e3a1af6d5e26a52c > compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44 > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14427ed2580000 > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=109e452e580000 #syz test --- x/fs/namei.c +++ y/fs/namei.c @@ -5529,11 +5529,12 @@ int filename_unlinkat(int dfd, struct fi struct dentry *dentry; struct path path; struct qstr last; - int type; + int type, loop; struct inode *inode; struct delegated_inode delegated_inode = { }; unsigned int lookup_flags = 0; retry: + loop = 0; error = filename_parentat(dfd, name, lookup_flags, &path, &last, &type); if (error) return error; @@ -5545,7 +5546,6 @@ retry: error = mnt_want_write(path.mnt); if (error) goto exit_path_put; -retry_deleg: dentry = start_dirop(path.dentry, &last, lookup_flags); error = PTR_ERR(dentry); if (IS_ERR(dentry)) @@ -5561,7 +5561,6 @@ retry_deleg: goto exit_drop_write; } inode = dentry->d_inode; - ihold(inode); error = security_path_unlink(&path, dentry); if (error) goto exit_end_dirop; @@ -5569,16 +5568,17 @@ retry_deleg: dentry, &delegated_inode); exit_end_dirop: end_dirop(dentry); - iput(inode); /* truncate the inode here */ if (is_delegated(&delegated_inode)) { error = break_deleg_wait(&delegated_inode); if (!error) - goto retry_deleg; + loop = 1; } exit_drop_write: mnt_drop_write(path.mnt); exit_path_put: path_put(&path); + if (loop) + goto retry; if (retry_estale(error, lookup_flags)) { lookup_flags |= LOOKUP_REVAL; goto retry; --