From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out162-62-57-210.mail.qq.com (out162-62-57-210.mail.qq.com [162.62.57.210]) (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 B678624A078 for ; Sat, 23 May 2026 03:22:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=162.62.57.210 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779506580; cv=none; b=BfGvHl0K52fYodLodYKHyK/8qYEZuBqyHwjcFnDC3sKEYAyVxxw4jQt4n4olId3OV6pOoiWPUlSwRJZl4e2zxmud8Y1rFfGwoaaT25nb7xBu7RUV/UWri7w3iXgeaOyTLuxDwvqmLVd6JDiAixoAEysg6Om7FqA38GEl/0KL6/4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779506580; c=relaxed/simple; bh=v++sOHuoCkYFIw6NM1aa2x7RkuTDSb0FqAzMz82s2xQ=; h=Message-ID:From:To:Cc:Subject:Date:In-Reply-To:References: MIME-Version; b=jEyq9HHHyLlWeSYRCGTeNiTQWk/IHbiZZ/KOA7iwgKyX5hq+5MpLpWAh2hJwd1wcRUDngXkyovqUNmWPSAWnkC/hICHZ3TDtq6guXYLhr7lB8OmeLS6+8LjQpjGGkgMJoolmusS7Wo6dNuKh522SFFIrNCDcTzx72RHcwe84vvk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=qq.com; spf=pass smtp.mailfrom=qq.com; dkim=pass (1024-bit key) header.d=qq.com header.i=@qq.com header.b=yeWTq5Qj; arc=none smtp.client-ip=162.62.57.210 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=qq.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qq.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=qq.com header.i=@qq.com header.b="yeWTq5Qj" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1779506565; bh=/0fZTYluDqoyV5t+brrpt42L2XyOFKW1nVbXBKAEeP8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=yeWTq5Qjs4xdRzqBAAWlp9srzXDcCyAmeymHwch660ONt+H/qaiGzoROMuDqvDxG9 qf3O95rOu33y9FVUd6HzfVR1bJNG+AtHlgfFoTiXi/y0xYBRYy1AQLfPxU0biIV93b lCd5yCmhfjx9Q/6uiOova1I7bJed7+nYcNMot9is= Received: from lxu-ped-host.. ([111.198.231.89]) by newxmesmtplogicsvrszc50-0.qq.com (NewEsmtp) with SMTP id 5ABB5645; Sat, 23 May 2026 11:22:43 +0800 X-QQ-mid: xmsmtpt1779506563te1z7zrn3 Message-ID: X-QQ-XMAILINFO: MrK54zaStYC/3XruDHcUtSFz3AALHanUsGUmpnDTdCM6ApIBag4MI2yQ3M9gSw j8LPn1RR/APuBU2fhGcvweqHoTbZiZ/Vs6AlEJVdsaW1MokPCVa4whdYQzZmlPQzpLPhzvSy7ogV tqGBFfzoIUPVhuTvvVTPBDbrccvPes9PmOGC/iWwgScr7LctViEHrEwE9JYOTjA/9U8uWwlP/SLu z6ct0EiBFKeOk5Ot5VvJRgsdjwVlVYxWoaUqOa637fIX+V27VzLDA/igis34e/6HWiFTh4/PudRP uDmgN4DVuFmKY9IinVLicIuKyCKPRhAGMar8ybnD6rKYQaT/KaF8LjmhTqXWSbkyxlK+rK5AQK13 Ewrs7X/dAlJEvhsT8eRQPFCunEUH/al3HA76Rhz4V+1gyXCprgUVkL+Bve1ZI4JeeCgA6QPdFIOh Hg0s4o7/c82hsUEscTZoEHaOtiBbjpprZJJ4WtVbt37eqfyAvY1cSg2qwHiaSlTEfMRnYhL3PeM4 ctKme426wIYlg9o9rWu2npYeAt7AJ3p8DGJPvFSnN5oH/4iDbwXtKi6yqvnu4g6EtbI47fE3KYB0 DnXtcNs85MYYJoJjFPHHgIavFiUzrnlm1BjsLKrEwcW7L/04rcEyEf1T+TuXrs/Y3UPX2aEm4s5R jDRrK7PmlcOukaeQzztrb6TsFnpYgpjYO7C9tzdu1ljV6FPMAle0BNK0c/17SIko6f97YnsDwbJo 0oH1UQi99dZUByVKHMfuKR9rTOzDaFOAaV9AtUeZrPlThmsGyJIPfyvk2ITHAGIgmgLzXdB88k0A /I0WQbGmYgCr9H+W8roqZ+ZXcZPdZxbtQaSLUiwKiSLm3qIoLVwYc8sfNkYeaL0PY2NElUz0baSO qDFlTaK8eQOgOHp/X5U71b3b19uz7X7KJ61MwSM4y6r/M4EHGW+9Nc+46MRj1RyT0MWJhZybRgrF TYIiatqd6TDocRzvCsmw2cj5n0Y37JqzbKbiOyFaEiUy9D2EsM+bAZrfRgiu2SJ64dPKBfiwk= X-QQ-XMRINFO: OWPUhxQsoeAVwkVaQIEGSKwwgKCxK/fD5g== From: Edward Adam Davis To: syzbot+69a3d7738ad3aa175caf@syzkaller.appspotmail.com Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [fs?] KASAN: slab-use-after-free Read in clear_tfile_check_list Date: Sat, 23 May 2026 11:22:44 +0800 X-OQ-MSGID: <20260523032243.57863-2-eadavis@qq.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <6a10a5e1.050a0220.66ea1.0008.GAE@google.com> References: <6a10a5e1.050a0220.66ea1.0008.GAE@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit #syz test diff --git a/fs/eventpoll.c b/fs/eventpoll.c index a569e98d4a99..b2fb707e06aa 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -1839,9 +1839,6 @@ static int ep_register_epitem(struct ep_ctl_ctx *ctx, struct eventpoll *ep, return error; } - if (full_check && !tep) - list_file(tfile, ctx); - ep_rbtree_insert(ep, epi); if (tep) @@ -1863,6 +1860,7 @@ static int ep_insert(struct ep_ctl_ctx *ctx, struct eventpoll *ep, struct epitem *epi; struct ep_pqueue epq; struct eventpoll *tep = NULL; + struct file *tfile; if (is_file_epoll(tf->file)) tep = tf->file->private_data; @@ -1873,6 +1871,7 @@ static int ep_insert(struct ep_ctl_ctx *ctx, struct eventpoll *ep, if (IS_ERR(epi)) return PTR_ERR(epi); + tfile = epi->ffd.file; error = ep_register_epitem(ctx, ep, epi, tep, full_check); if (error) return error; @@ -1910,6 +1909,9 @@ static int ep_insert(struct ep_ctl_ctx *ctx, struct eventpoll *ep, return -ENOMEM; } + if (full_check && !tep) + list_file(tfile, ctx); + /* Drop the new item onto the ready list if it is already ready. */ spin_lock_irq(&ep->lock);