Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp160164lqa; Fri, 26 Apr 2024 19:06:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXTQmMarjagroOTxOEvwXcTPYQRtTWe9blIaOWNMX0YfEM92ldctKMIoadzJlvocVI3+xdUB++uwh0bJIV3+Bi8U0flCb5l0bKFn2FG6g== X-Google-Smtp-Source: AGHT+IGhtzuzsYHa+4D7N5H9tG0qnfUohLawQloFAzn8VEY63J/Uj2pYw+BlZme2vPwmW5uFbQul X-Received: by 2002:a17:906:b2d2:b0:a58:eab7:7bab with SMTP id cf18-20020a170906b2d200b00a58eab77babmr5390ejb.52.1714183592501; Fri, 26 Apr 2024 19:06:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714183592; cv=pass; d=google.com; s=arc-20160816; b=QYRiMx61Mk8D1zHpIoOg2Xk2QUYFsukcDPsRf7/RYxjV/3w0TfDBZc4BgykXbUz9bo s2u18upy0EzPv/dz9egEEJ2tpHanadUzh9tGnndkmDviH4HvBkSvQhtlAhN++Bldh42s V2dUDGg+L0u7Xjqxalnry/5uq3q8PammgsnJlMi4M4JjXzoumh7FJcEXxQzEpidLEno7 2oHKtfoou5GbLY4T+4VAZyN+WQ8ZTC5nV4txCOYp1J8usccaNx5+1QwFBcLaUkBNcmqd XxF8U3Ta8k4lQrfxzVvM4+nys/QuUWxmohquPwmVSfmKSTm9/gZuPnE89eurI+q7hxse qCGA== 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=Kq5CTnPGFjrTVjvNpYAoEV1ZOrdRLQfc4mREx4ymTTU=; fh=yaXYBe9sbkmvlk2mHY0QupCsCyiBqDs07jTvbP5wp9k=; b=yMv9PS5lGkhJqQ+pAelavyd3kn7qNQZ2SWrDIGyAk/CCzdM+ZpJ8qG4W15VNqIzEDg GFBHmJvZkJL1x4or7P69dl7yDEpHBVwFVJSFWfV4BbNkhos9lzmoaLT/ZMs9VvpxBdtF RNFWOqrOoorF207WAfuRhwVtAX48LqktLurf7LYnUPQSo4ptH+6QAUWs6Z+wsB8wbKlu vEmiCtfq5mv9hTp+j5AXcjn42rB2MS/sb4CFZnnc5XkXPeAGxmtarceDPUiBdln5itGl KbUBdjknWD8wn25le3d/Xz4ICrwt175ms+3YgBrFoK0DUtkKSaKZ1RNYhdwWLWblFkjj teaA==; 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-160867-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160867-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id he30-20020a1709073d9e00b00a55ba085a11si7585330ejc.638.2024.04.26.19.06.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 19:06:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-160867-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-160867-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160867-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 3CB2A1F229D0 for ; Sat, 27 Apr 2024 02:06:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C779D38DF2; Sat, 27 Apr 2024 02:06:25 +0000 (UTC) Received: from mail114-241.sinamail.sina.com.cn (mail114-241.sinamail.sina.com.cn [218.30.114.241]) (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 5D9B7381AA for ; Sat, 27 Apr 2024 02:06:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=218.30.114.241 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714183585; cv=none; b=OeK65V5yimXrO/nis2S/ParDRE+ZsnLPx9qKWPSTk0D+QOnnzBfI5au87RubsSGG4IQLpi2FOvHTQUIi1Q1rk8g6Ob4gKWMF/YM4YVKltB/ZCuctEPNGyPIFfzMzvr0mEmHIBmcrCz30SjKr3Ip0s73N7onLLmsQUaNy+oBa4n0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714183585; c=relaxed/simple; bh=BDX0DMYayhbQWYlWwLYIqDlKTvcAwxEAQZfFRxP9Tu4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=DVaYu3KbVH0MBctIaGQcifrElcGBRtgvR6H7SdaQFTh6Zc7H5EvdO8ahu4MTaHHY87zHEzp3/f3dXl9MNIdb0ZZwiSlTCDxQoXJdLXc+ubeWai98e73F143mAA3irn4LNFJLsS3rPyCKWz3mgH8d7sigYhu5EVjsEoxaH+g+XLw= 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.114.241 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.88.50.155]) by sina.com (172.16.235.24) with ESMTP id 662C5D9400007B69; Sat, 27 Apr 2024 10:06:14 +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: 25800245089264 X-SMAIL-UIID: C03A436B7BDF41AA9F4264E2D8B43439-20240427-100614-1 From: Hillf Danton To: syzbot Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [ntfs3?] KASAN: slab-use-after-free Read in chrdev_open Date: Sat, 27 Apr 2024 10:06:15 +0800 Message-Id: <20240427020615.3615-1-hdanton@sina.com> In-Reply-To: <000000000000f386f90616fea5ef@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 Fri, 26 Apr 2024 05:00:21 -0700 > syzbot found the following issue on: > > HEAD commit: e33c4963bf53 Merge tag 'nfsd-6.9-5' of git://git.kernel.or.. > git tree: upstream > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12499380980000 #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git e33c4963bf53 --- x/fs/namei.c +++ y/fs/namei.c @@ -3795,8 +3795,11 @@ static struct file *path_openat(struct n while (!(error = link_path_walk(s, nd)) && (s = open_last_lookups(nd, file, op)) != NULL) ; - if (!error) + if (!error) { + path_get(&nd->path); error = do_open(nd, file, op); + path_put(&nd->path); + } terminate_walk(nd); } if (likely(!error)) { --