Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp355873lqp; Wed, 12 Jun 2024 03:51:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVV5ToMuNmq/AscLpa5JUg9cwnSXetexvcfiBbyEqPbSjZeOEtLmDuYWJaePLmlJcCHMNXoz1Q3aWGlHCKUu/zB7CYZZeVeTzPmDCcP8w== X-Google-Smtp-Source: AGHT+IEEkplr9MrdblLcFglnj6n+KufxFOCLIT6Me+uVpWiVnq65mw4zGunMJGzqxrNbNJUKBmp3 X-Received: by 2002:a05:6358:2803:b0:17b:f721:4565 with SMTP id e5c5f4694b2df-19f69d46bd1mr190740855d.9.1718189492262; Wed, 12 Jun 2024 03:51:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718189492; cv=pass; d=google.com; s=arc-20160816; b=eF4RdliSzNEJI3PtBjprCgsTNu7B3TwX7Qkf+vrsJsnuRJ3WdoUfxg2BgpOswOb3AI nHB7IiIeb2/rpuAriNvpivsrpD7gmuee1y5I/kElQX9tH9oQdEU5DeK43rnBsvD6AbpB k/M7WPIo3tX/XIEN0T/uuu1ZaF+LiQ+A36g00qlj1pveQm8Q89H2z+vHdqwa4bHdRgit dWVHiXFdi9ZORYNkKzIm3A1aP9bMNIBM4EPZHTrwTkg3SMe+mU6LUP74+xjqF+H18HHX ikPLpUNAroSmJ4srZHBEMqvinvu0ZhT0usN0S5UYFNLcXW2ypjIAnG7BiIW4yj7gfcie PuSQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=Ljrun4fMb4NFtw/eNy/bTOaMDrvwOUmPwhZpNiJy9dI=; fh=saDFzb8XH/fsyCAPCgnXHQYabHFgY8pQa56eeXK7xBY=; b=CXmOjyDGoQO2vgVfTuSGhCZNQis6f6um2rRooT4Cn7NniC2WcX/VWF/V0L3LuRsB1N XwGpSAJWGnXqLWXBnHqffyLCGrvB8T68oB/Qsfed4cKJyGOikwqp2zQx+qyDbM0i07eM jl9BB+TuNIsqmMyDVyENgLFDGQeQIiV7k/vrtqU6ZJephEbfsMKZfwftnBkDEAzWwYzt qJZvq8oqbl/wRA6XfbI2Wkp84RdrAQ4OgUfG0KNMsncs784qf6XjPGQvvKVfI5sQujUM u7G/cWs8cSyz3az57vLjvVpCAYAz8VSGkWEkol/9Dg5StkfB3cbevj6ldpP3XiVjaoqC q4vQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-211366-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211366-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-6e48d6bae82si8804067a12.193.2024.06.12.03.51.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 03:51:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211366-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-211366-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211366-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 8B382B22400 for ; Wed, 12 Jun 2024 10:45:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 077FB169ACF; Wed, 12 Jun 2024 10:45:46 +0000 (UTC) Received: from mail115-100.sinamail.sina.com.cn (mail115-100.sinamail.sina.com.cn [218.30.115.100]) (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 EF4E2155329 for ; Wed, 12 Jun 2024 10:45:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=218.30.115.100 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718189145; cv=none; b=BQTLHqNZlbGJn6sqzDD8Kd1I1NpxMZUoYe4Ih7NaTjHj/4m3w8uH4lzlAt9H75Lcqz5Jpf6Wx/ZtUy9jWko09HjvBzgJl2WFAFeErQbYt3LZu0YXuAIO6LXhrYKf+fAv/aifPv2/+9dN8+1iDMWw65IpMIqWl4N1n3ipSmyvCos= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718189145; c=relaxed/simple; bh=+mQ7+8F7eCub5AETH4YlnwofaJeIjl8cgIbHv9ox1Ns=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=bE1HSt5KZAKY7tG+aZIypMmO8hyL0GOW8qVuhMCexAlz3Imq3HrM0oM8O03HF6ovKWufgyPmFoX+Nk4FXJbd/rA9AtokepYM/CP++3Y+JoFEGAe4ZTz79rJg7hvpLcMhgx6K503f95OpkG5byGel9AQMY8zY58iiO4rU5VWWpFQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com; spf=pass smtp.mailfrom=sina.com; arc=none smtp.client-ip=218.30.115.100 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sina.com X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([113.118.70.94]) by sina.com (172.16.235.24) with ESMTP id 66697C49000079FB; Wed, 12 Jun 2024 18:45:31 +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: 52827045088841 X-SMAIL-UIID: 793C01AB8E1F4AAF9D241D47517A0182-20240612-184531-1 From: Hillf Danton To: syzbot Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [nilfs?] [mm?] KASAN: slab-use-after-free Read in lru_add_fn Date: Wed, 12 Jun 2024 18:45:20 +0800 Message-Id: <20240612104520.2217-1-hdanton@sina.com> In-Reply-To: <000000000000cae276061aa12d5e@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 On Tue, 11 Jun 2024 11:10:20 -0700 > syzbot has found a reproducer for the following issue on: > > HEAD commit: 83a7eefedc9b Linux 6.10-rc3 > git tree: upstream > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17c645e2980000 #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master --- x/fs/read_write.c +++ y/fs/read_write.c 2024-06-12 18:38:40.826180800 +0800 @@ -583,6 +583,7 @@ ssize_t vfs_write(struct file *file, con return ret; if (count > MAX_RW_COUNT) count = MAX_RW_COUNT; + ihold(file_inode(file)); file_start_write(file); if (file->f_op->write) ret = file->f_op->write(file, buf, count, pos); @@ -596,6 +597,7 @@ ssize_t vfs_write(struct file *file, con } inc_syscw(current); file_end_write(file); + iput(file_inode(file)); return ret; } --