Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp553768lqb; Wed, 17 Apr 2024 04:44:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX7/dhfs8nPbTRPRtk9PHtusrhd6QOMxWhrKG9OVDusUCTZPqJHevJR408Jaazgok6c6L3/ci1mEQMs2C+NCNa2N8Rkb1Jcd0megerS7w== X-Google-Smtp-Source: AGHT+IFt90NFrSPwI7vMJP8Jf4MBL4sa0eRwYX56Sh+d/v9l2aQTcs8ydK4g+grXKr9Gk0uS3xWN X-Received: by 2002:a17:902:860a:b0:1e6:3586:b6dc with SMTP id f10-20020a170902860a00b001e63586b6dcmr8712772plo.18.1713354274204; Wed, 17 Apr 2024 04:44:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713354274; cv=pass; d=google.com; s=arc-20160816; b=s7TqBHNuBkQ20R8oZzx/WL8PKxlyXdu+J2iY5e5f+H7ttkD6r1Wztoj5E6BioKoiED tviCt0/8beiQn0Cw6XpiqbRfhIT4Zce8HBDyIDzixiulei9QSbp6pt9prPxXyPXMXRMg jcKtTijYOgEYLuAK/QAXfO0zliZbegN/78pr2tYi6Uxf0BXMFfo0sfqy1eZJyRPXCWrf 2kVHSPOXM/ON9BmXRSgoy93VpquoaHPxuwMBDNiinfD1NufSV002C8bysjwQyKNBbNqm fODG1/gDR9SrsZ6BvqIqsz+SN+dKo6zPw0br+ql40H+oLv0NmcEsQLD87sBZHiZNksPN 0ciw== 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:dkim-signature; bh=JQ8A+tg33yscqpJNEg1p63Z2U59++2mDdXcS3MRskzo=; fh=bqpxEEp6p4CjDfKXgUKxfGYOBu374B4LUNX7IQCrEG4=; b=aRT3RTRoXPqqfZ+qI5X3ftRM0uYZV0qDbw6hHa9VsvCfGkP42QKqotM6Qm0pWMc27F X7mTjQ6Rdo7P/paiX6tXJ+lWMXoYFK8KHb7y6ta4z/u7Xx8QSg4WkAujWNQAIpuWhniV eBXqQKD03hz/Q6kIdKXJPWywZ1vUuGawvX9tfddALtjKbLwmXH4LwzszuUmqE7uSfgo3 BF9JtK1kyuB3pxOMrfOd0+vJEE8iqkk2xlhRaA1W0JmLssIGiSamCILWUfMcJiPvOdXO RWEqaNgQVytCLvfjL2X0VEgoOPnvAeTnI+i2weLsKGP9WoDFxWH0VqVWu0BEVGnrpALT DEIQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="spD+u/L1"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-148399-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148399-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id i7-20020a170902c94700b001dcaf709f55si11392696pla.207.2024.04.17.04.44.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 04:44:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-148399-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="spD+u/L1"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-148399-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148399-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 33BDEB24AC9 for ; Wed, 17 Apr 2024 11:23:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5EEDA13C9A1; Wed, 17 Apr 2024 11:22:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="spD+u/L1" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 8863B13C675 for ; Wed, 17 Apr 2024 11:22:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713352974; cv=none; b=TZFqBKWkCJdp1Nri6/ljpGLU/ssf5RZrX0A4Hf/KDXdTHdT21w1Tm36hXQQlcmohWjWBGaVehl7L89ohfza+YIjZnmeICfoUH4TuJi/yWNdjEbMe53475umh1hLynev8Ik23BLuiy1yftp48BXi2XY1WIqrMKi8KocTFAYyoxh0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713352974; c=relaxed/simple; bh=b9eQVO5DEetlNMd2dejQjvjZNeo8+gjXxwiMgoytLg4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=XeD04ujEP2xG+kcTylsp0ZwSDhVEnOhMe/21aLveH0POTgWpFRGtIhW6D5ok23tcftql02nPwxVzK2COAKLYU3MsxXArcOfE6p6DfnxVRcsw7EogH7DbPcdX8fT6jpqnQC0e12RHpBpAR3/MnqioSPZCz//S+vvaDg98Y1LtJ34= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=spD+u/L1; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A379C072AA; Wed, 17 Apr 2024 11:22:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713352974; bh=b9eQVO5DEetlNMd2dejQjvjZNeo8+gjXxwiMgoytLg4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=spD+u/L16KVIRaZE4iypYl0pLJKCD7wfCKq26ynKvEfNV5LzwHJR66H0g9Uzf3tBC O3ZEiRTqDndUbewaJpbGy19M7NlkdBW9HyK4lhyZzWqAurdBquw10uwq2nrGY5SUtD hcE8u7rbtxrYk8b76UgxeeDOBgWWG7LPv+6yQNuxgngnvyMS/x2xJ2T+5k25f73cdG 2lWlUYJ2CzsIy9bLWMPHG9ZxYcONUnMTtEBpTFqnoXIHx2GuMi5BqdzQy6jTk6F8h2 RQB3De8nCGQw4VBFFF2zGbZSyUO0PGmjPpVgru3qglgKYQcaK1yzTHA5c1PZobpXgC jl+32K0O7dpiQ== From: Christian Brauner To: David Woodhouse , Ilya Denisyev Cc: Christian Brauner , Richard Weinberger , Zhihao Cheng , Fabian Frederick , Nick Desaulniers , Wedson Almeida Filho , KaiGai Kohei , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: Re: [PATCH] jffs2: prevent xattr node from overflowing the eraseblock Date: Wed, 17 Apr 2024 13:22:04 +0200 Message-ID: <20240417-kapern-angegangen-0ac84cd51096@brauner> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240412155357.237803-1-dev@elkcl.ru> References: <20240412155357.237803-1-dev@elkcl.ru> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Developer-Signature: v=1; a=openpgp-sha256; l=1405; i=brauner@kernel.org; h=from:subject:message-id; bh=b9eQVO5DEetlNMd2dejQjvjZNeo8+gjXxwiMgoytLg4=; b=owGbwMvMwCU28Zj0gdSKO4sYT6slMaTJb/i5zlVaat5v/hnsXRWbOKbddb9YdNj8zpvUXWefm ARtallj1VHKwiDGxSArpsji0G4SLrecp2KzUaYGzBxWJpAhDFycAjARoxWMDOf7km0/eViH7L64 bco3V/3PO3tWv2H64FbiPmOLuaGYoTUjw7+PE6pbPjZ0/jyn8vkkm+muDDbj6UH/ZdjrloUEOen vYQQA X-Developer-Key: i=brauner@kernel.org; a=openpgp; fpr=4880B8C9BD0E5106FC070F4F7B3C391EFEA93624 Content-Transfer-Encoding: 8bit On Fri, 12 Apr 2024 18:53:54 +0300, Ilya Denisyev wrote: > Add a check to make sure that the requested xattr node size is no larger > than the eraseblock minus the cleanmarker. > > Unlike the usual inode nodes, the xattr nodes aren't split into parts > and spread across multiple eraseblocks, which means that a xattr node > must not occupy more than one eraseblock. If the requested xattr value is > too large, the xattr node can spill onto the next eraseblock, overwriting > the nodes and causing errors such as: > > [...] I have to say that the rick-roll of your domain doesn't inspire a lot of confidence though... Applied to the vfs.misc branch of the vfs/vfs.git tree. Patches in the vfs.misc branch should appear in linux-next soon. Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it. It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated. Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch. tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git branch: vfs.misc [1/1] jffs2: prevent xattr node from overflowing the eraseblock https://git.kernel.org/vfs/vfs/c/c6854e5a267c