From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 2C4404B44C0; Thu, 17 Sep 2026 18:05:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789668301; cv=none; b=IyRNZ9nok7SccDYQWJLL3yit7fga8V0e0sSiX8QLj7K+XKQeczbvEwVbRjirkaKoz7o1JLELoGoXkDr+IoI5NQWwkv71Cipda3ijd9+vFDSaUSePMb5QtH9I0hT+tM1iN02qCZTGZgqujImSucT6WVbf9L2sr8b456J69FC9LNY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789668301; c=relaxed/simple; bh=zNsr1gBzLqhpLh/9NWJLLosab6QD52hOTHoWb6+tgVI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oB4O690tr/DWKpcBYPZEw7Skvt/IOzhdLGxacYABgOpQBQJ/Dcwk372IKG+TQlwHqkNY20tEQSc+KVsnGuL26OrnstqXhwy5VdviPKfYR0c7s89YNCv3J3o4W/YX3aYUbpra5+0T0VdNG7l3UWPQ50T2uBaYjq9cp/+4lmB0Obo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FVkZmS64; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="FVkZmS64" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7F70C1F000FF; Thu, 17 Sep 2026 18:04:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789668300; bh=UPpcVdETse6SrAMJjXAoIJvJS9MjFOu9wCWxjDicJl0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=FVkZmS64vmXqDlgJLLxmjexXifrPMWcBERlQkpa/JN4LBriYEFq0e07jmu1EEpxN9 oc4PQTfa/W+w9TTPQql1QPiqg90qFuSascJTp6l8ih57eiS9dP/Z6PHHnHNg8eXeVK WkRkHhvwrRMZn7GSzpg0qMt9iZ1V6rAOsj3LZcfU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Farhad Alemi , Christoph Hellwig , "Christian Brauner (Amutable)" , Sasha Levin Subject: [PATCH 6.12 0380/1102] freevxfs: dont BUG() on unknown typed-extent type Date: Thu, 17 Sep 2026 16:05:23 +0100 Message-ID: <20260917151549.194055139@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260917151539.408551884@linuxfoundation.org> References: <20260917151539.408551884@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Farhad Alemi [ Upstream commit 704d48d81dc41470e108811c32c577ada66192d4 ] vxfs_bmap_typed() handles four typed-extent types and calls BUG() in its default case, so an on-disk typed extent with any other type value crashes the kernel. It is reachable from ioctl(FIBMAP) on a regular file: kernel BUG at fs/freevxfs/vxfs_bmap.c:230! RIP: vxfs_bmap_typed fs/freevxfs/vxfs_bmap.c:230 [inline] vxfs_bmap1+0x128a/0x12d0 fs/freevxfs/vxfs_bmap.c:257 Replace the BUG() with WARN_ON_ONCE() and return 0 -- the value vxfs_bmap_typed() already returns on failure (and from the DEV4 case above); vxfs_getblk() maps 0 to -EIO, so the ioctl fails cleanly. Reported-by: Farhad Alemi Signed-off-by: Farhad Alemi Link: https://patch.msgid.link/CA+0ovChveuAwv=t15dr2m09E32bM48hHJxvfeEYZOhdNiEc9Tw@mail.gmail.com Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin --- fs/freevxfs/vxfs_bmap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/freevxfs/vxfs_bmap.c b/fs/freevxfs/vxfs_bmap.c index 26d367e3668da..de4003597b555 100644 --- a/fs/freevxfs/vxfs_bmap.c +++ b/fs/freevxfs/vxfs_bmap.c @@ -227,7 +227,8 @@ vxfs_bmap_typed(struct inode *ip, long iblock) return 0; } default: - BUG(); + WARN_ON_ONCE(1); + return 0; } } -- 2.53.0