From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-101.freemail.mail.aliyun.com (out30-101.freemail.mail.aliyun.com [115.124.30.101]) (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 504E03B19C2 for ; Tue, 23 Jun 2026 06:16:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782195368; cv=none; b=MkwJQyvtjKmW3yqM1kMdBFntXU65pnug8Z3HDA1YJTz76seSMp3ht5ThufwM7jCMtIXvXtLc1YQp14HmIs3vxfCsni96RQ38y2J3FNdtryKomS1f/UngwZ3RFNae19QZqcw9Jz9lWlJ84J12ONVzTiZ/SacVti79xa7nox5cXlI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782195368; c=relaxed/simple; bh=HiluReCWMiih0+oN+WfV89Cwvfz04nNsjbUweVGR+3I=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=KjRf/Uk5q7SKPMowQuIHLJE+uanqV1rUAl1fkJWuZG1WrjlMMfMikjS5JOn6O9UuuBsf5+/dNodAt22ZIPDYNWz70TZP26EmRG/3WJxgyFWganObI64LrsEMPbgRW8rgfCHkEjjjdQKJ4hVeTY48xf2VgmRop/WGwlmr6QC7S3I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=KMeLeXau; arc=none smtp.client-ip=115.124.30.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="KMeLeXau" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1782195363; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=uHj27KMJmGb9yJsUhSyQ3HPQ2wiyW/riJOs9cr4ntD8=; b=KMeLeXau1yT2SND9b5VRMkEjqKJBG3t4L5mJb2nfZKnUtEys1SU/OU4E6YsKvwnDou4w3+tpBSdhJJ3LkZgAYFVHMJY6kkrkrvRPnBODlQtwAAxvI2CtDb84wNeqq1cJx7R/3c2vM2Bi/FqKo7C/GF8/XIkB5Eq5oCtxBoLJFGg= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033045133197;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0X5SxI4M_1782195362; Received: from 30.221.132.85(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0X5SxI4M_1782195362 cluster:ay36) by smtp.aliyun-inc.com; Tue, 23 Jun 2026 14:16:02 +0800 Message-ID: Date: Tue, 23 Jun 2026 14:16:01 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: erofs: is z_erofs_put_pcluster()'s sbi access in the same UAF window as 1aee05e814d2? To: Zhan Xusheng Cc: Gao Xiang , Chao Yu , Jianan Huang , linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org, Zhan Xusheng References: <20260623033833.3440803-1-zhanxusheng@xiaomi.com> From: Gao Xiang In-Reply-To: <20260623033833.3440803-1-zhanxusheng@xiaomi.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2026/6/23 11:38, Zhan Xusheng wrote: > From: Zhan Xusheng > > On 2026/6/23, Gao Xiang wrote: >> In short, I saw some similar report from LLMs, but I think >> erofs_shrinker_unregister() should block this from kfree(sbi) >> by design. > > Right, that's the part I'd missed: erofs_shrinker_unregister() drains > sbi->managed_pslots (while (!xa_empty(...)) z_erofs_shrink_scan()) in > ->put_super before erofs_sb_free(), so the in-flight pcluster keeps sbi > pinned across z_erofs_put_pcluster(). Thanks for the clarification. Yes, that is what I meant, also I found usually LLMs could miss some details by chance, so IMHO we'd better to check manually again. Thanks, Gao Xiang > > Zhan Xusheng