From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx.swemel.ru (mx.swemel.ru [95.143.211.150]) (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 3C5863659F1; Mon, 23 Mar 2026 07:55:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.143.211.150 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774252552; cv=none; b=Z3fgVYM3ysjLQIfjtvD2PNK2Dp+Mi+ay3P41hNY1pMXWf3ij51iEnGKmjN1dEQqg7PT+kPWM+ETYgXDj5igCuNTeYLBzcvP2x6Uwpi4f5/l1yypcpbQ1PCYJIG/D3MsFqb3pIGZ5u37phinGh8gk3oTsWMZItVbEA+Q7Z6Sy0YY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774252552; c=relaxed/simple; bh=TYKQKI2QaFDIMakzEAYl+Xh+rdI9GarPPVdk/kCcfzk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Qkc+SldNpjq871/cC93gsRtOMnr/yYC4YiN/IOzNaflW+4xXuJW5QB0wGTkTgbc6g5Bz/IC5Y00Xp5pdppnrJyZjY4XhyBa2ElEwssbm/abix5Cg7KFGrF8RKSo062iAp5txhhGRsB9vsj+CJ9gNTPaGEayG258yCE3/fZL2Exo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=swemel.ru; spf=pass smtp.mailfrom=swemel.ru; dkim=pass (1024-bit key) header.d=swemel.ru header.i=@swemel.ru header.b=ahs+/kMn; arc=none smtp.client-ip=95.143.211.150 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=swemel.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=swemel.ru Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=swemel.ru header.i=@swemel.ru header.b="ahs+/kMn" From: Denis Arefev DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=swemel.ru; s=mail; t=1774252089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=mtIn7DP71PXd+663izgnCvu3LmpJDtlv1yNdOZnKHqg=; b=ahs+/kMnjPt9fEYJjQbd+5OH32ue4Jh+F8UcVlQYnqJ7psQEbCmyF8Ww5aPhMfRzh+6wQB JvxNkrS7kZvKERejGbtlIjsEVZjv8XYzkOTy1RBntBmRv8NS9JGINNP36JxiMuiHZnY2Ks XkcB7aqOY9NIYBZ0YmAgxNqndpvXQB0= To: stable@vger.kernel.org, Greg Kroah-Hartman Cc: Gao Xiang , Chao Yu , Yue Hu , Jeffle Xu , linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: [PATCH 6.1 0/1] erofs: Fix the slab-out-of-bounds in drop_buffers() Date: Mon, 23 Mar 2026 10:48:05 +0300 Message-ID: <20260323074809.4542-1-arefev@swemel.ru> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Syzbot reported that a KASAN slab-out-of-bounds bug was discovered in the drop_buffers() function [1]. The root cause is that erofs_raw_access_aops does not define .release_folio and .invalidate_folio. When using iomap-based operations, folio->private may contain iomap-specific data rather than buffer_heads. Without special handlers, the kernel may fall back to generic functions (e.g., drop_buffers), which incorrectly treat folio->private as a list of buffer_head structures, leading to incorrect memory interpretation and out-of-bounds access. This can be fixed by explicitly setting .release_folio and .invalidate_folio to iomap_release_folio and iomap_invalidate_folio, respectively, but there is a commit ce529cc25b184e93397b94a8a322128fc0095cbb in upstream that implicitly fixes this bug. Please commit it to the stable branch v6.1.y . [1] https://syzkaller.appspot.com/bug?id=c6aeabd0c4ad2466f63a274faf2a123103f8fbf7 Jingbo Xu (1): erofs: enable large folios for iomap mode fs/erofs/data.c | 2 ++ fs/erofs/inode.c | 2 ++ 2 files changed, 4 insertions(+) -- 2.43.0