Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp286106lqa; Sat, 27 Apr 2024 02:18:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVZtaq8zniC4Qb3SnbZNwkj5Bw7PyRVxS7YmgKQn4PDdRr2XhTcZM93UbwQ9Qtcu2LpHfpxO0o8BsQldp1KXmTQMXucQnu/lQ0WzbphnQ== X-Google-Smtp-Source: AGHT+IHhkoXdJMaP4oqf979Uj8pDn+d096/jMpg1eZv36kNh+f40VS+wHwBYJ8PE3vHFufuupJJh X-Received: by 2002:a17:906:fb0c:b0:a58:8827:f85a with SMTP id lz12-20020a170906fb0c00b00a588827f85amr1583644ejb.25.1714209509668; Sat, 27 Apr 2024 02:18:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714209509; cv=pass; d=google.com; s=arc-20160816; b=Rn0p9GLptxC4yHlL1dQRTUD9j5ln4un/f6rmutajgkYOP/YUZKSBZrLmG5fmCO1o0h kPVERxD5Ffnn9mxGIdXfDopdterEPEwPFe4KCkqDiPV9pFvD1me+EygbSWgsnquAhx7X 6K2IG825ST/Il42fiCAryNnViIki8E4Y5YMMPf4sK14Jj25qv+yLTp7JhVqAcEXtZn4t nR1epFouEHWWqpmMQ6+rhFzyzkVDrmVlB9NdXTpvEKK8CZmc+6m4faLA0xRTSMvlQXFy 0Hps0Y7Akz1jlm1BIzKUDZbTPd/W6UcxAShGD2tN/54l29IEqix3Zcj5V+j8ZGEdJ9Jv l7Jg== 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=aJMLgyebYqXAWS9DpSrjvJp2JQH3lzauNqFAZ/iAYk0=; fh=yaXYBe9sbkmvlk2mHY0QupCsCyiBqDs07jTvbP5wp9k=; b=YinvIqSA6JrNIxI19cVB+qljEl4GYsVBCS0r9C0h+HmUgLjv9GwsKoKjLZ7sFDWNCP KyXAe6YYt2CgUHIDIFClRdynD0hbQaPFAe7RgbELeQJU0Ni2wYMApiiV9HI+V89S3O0z 1YZ0D6z01CPPR74Sw7is6PAZ6ngkOtT8qw4iqh/Ynum3olV4Lbg4vssn0b+2f3ojXeb7 WuNbjp6XKTwkZYr/SmZlB2FOd8b+mZoKICXqgKLKjR7SZ+Qx3owgRN4Qq9PF7XVmmSak pIYW4TzA7RIf0l9RDfzsipC4H2tFQSBbNqFIKG/9lNFXbUMjuayeJ87pMzJZuD+3PvwD 0X/Q==; 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-160974-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160974-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 r20-20020a170906351400b00a58a4c8f27asi3652408eja.442.2024.04.27.02.18.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Apr 2024 02:18:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-160974-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-160974-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160974-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 413DC1F22304 for ; Sat, 27 Apr 2024 09:18:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5B1C846424; Sat, 27 Apr 2024 09:18:23 +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 AF50641C7A for ; Sat, 27 Apr 2024 09:18:16 +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=1714209502; cv=none; b=rlpw3bq/+5VObuqRp3rkSCVQQvZc5wXTWCQbRxcsgDsl64aJP1OFJ2a0oFwU5J7PXVH6YBCK5POmP+Y0aa6UipQTEhDpw9n4VjRji5E2CnPt9g8jZMMWWklJPWhuRZKbEdbjs42PNFQnK1NLB8B0Ztq0TlfOn6TDezxoQ7I2N4E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714209502; c=relaxed/simple; bh=Ae1HlMl01OgfnK8gTYPqMJ88tOqqBJRj3YdR89v+Aic=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=HXcvcUNle7SIqaOiI1V/qXLtmDZh16S8dR5z7yQ0FBR1YPFwjLp0P/7ghc0io3NdI8Jz8G85XdKCnbZKqP/t1t/9bp9mo+lOHuP/XeKB5xB4cywg2DvzW6j2xj/lhQvr4Flas3NoTUvr/0lROKCGlIJpGaYOXpzdGrYFX/1UVyM= 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.88.50.155]) by sina.com (172.16.235.24) with ESMTP id 662CC2CA00002B3C; Sat, 27 Apr 2024 17:18:07 +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: 51680645089239 X-SMAIL-UIID: B78514CD79F74D33B07B87E548984C76-20240427-171807-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 17:18:05 +0800 Message-Id: <20240427091805.3855-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/char_dev.c +++ y/fs/char_dev.c @@ -387,6 +387,8 @@ static int chrdev_open(struct inode *ino if (!kobj) return -ENXIO; new = container_of(kobj, struct cdev, kobj); + if (!cdev_get(new)) + return -ENXIO; spin_lock(&cdev_lock); /* Check i_cdev again in case somebody beat us to it while we dropped the lock. */ --