From patchwork Mon Nov 7 16:49:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13034890 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3AD7C4332F for ; Mon, 7 Nov 2022 16:50:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 47EA38E0005; Mon, 7 Nov 2022 11:50:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 408338E0002; Mon, 7 Nov 2022 11:50:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2CFD18E0005; Mon, 7 Nov 2022 11:50:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 1698A8E0002 for ; Mon, 7 Nov 2022 11:50:07 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id C5EDFAAE65 for ; Mon, 7 Nov 2022 16:50:06 +0000 (UTC) X-FDA: 80107233612.09.87602CC Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf08.hostedemail.com (Postfix) with ESMTP id 2392E160009 for ; Mon, 7 Nov 2022 16:50:05 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1D6C2611C6; Mon, 7 Nov 2022 16:50:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0D389C43148; Mon, 7 Nov 2022 16:50:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667839804; bh=XqrOKcVsJ+boRrvDno7gBUrja/HWLI37DpoaBs9pWC0=; h=From:To:Cc:Subject:Date:From; b=myvoQ3iqA5MefMAxdVw8To6/c08n8axdkoYs+/ZOHzGAxHn9l8Gxp/ypQZkhtsvXo cThcewflV54JJdQGp8/TFJg+X9KLWh1hMbIe3DHuWsie8f8SRuPLsMkDCg68wbw7K4 BtG3Xf5zfIqFFh/zWK1KMi8C1Y8mOhn/P+sMFXZcEpZWGnN6wb+oSUXdq7c6jQCT/p jieRwpdbGeMJ3H446Z+GY/l8zULzVJlFdAcUJYPCEwR3wNPfkMo5xxAtQ2Zs1PeBFK XiaG6hS58IceS7q4qB4P1VQsoPPk4HvQXJFN42X8v9rd4ni/8vDwjkm92M3DzAxLs9 oSNzBINXerClg== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , Shuah Khan , damon@lists.linux.dev, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/2] Fix slab-out-of-bounds Write in dbgfs_rm_context_write Date: Mon, 7 Nov 2022 16:49:59 +0000 Message-Id: <20221107165001.5717-1-sj@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=myvoQ3iq; spf=pass (imf08.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1667839806; a=rsa-sha256; cv=none; b=UaO5tvmWg7yQo0qNa642fyQlYXYOja05o+KIQ7GPWxmrxB8kOisztOguGMlHEspfLWW540 o4gpF+rRRasKpzIe+v0p1llEGeZWahzXM2xlQpf4JjQ+0PGz65e+D7E7lr+5akhiNbprmv N3AtHjtI7C2qchdshI0eJh8Q1shX2wo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1667839806; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=/g+rNC97SS6ZLBI32M2hXurqEqPSG9LiinS0ajJjqwI=; b=66/V7lkIONWv7UhnItFjbuNXIPaUCAo0WAByid4O0z/ZXmmvC8a/m1LAoNAeBEJA5bjf+d mnb8dJiIPDsuAes4fUD6pQtmuIz2VV24y0WVn5OS6lEd+1ecOdlUo9YXSYJR4vLFid7RQO f4KF1aSzU06/1qVNSatXOGPzlcoP0bY= X-Stat-Signature: iuhi5bj3wb5ue7kj6wbna1u74bhqjsk7 X-Rspamd-Queue-Id: 2392E160009 Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=myvoQ3iq; spf=pass (imf08.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-Rspamd-Server: rspam05 X-Rspam-User: X-HE-Tag: 1667839805-335844 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Changes from v1 (https://lore.kernel.org/damon/20221031182554.7882-1-sj@kernel.org/) - Rebase on latest mm-unstable --- This patchset is for fixing (patch 1) the syzbot-reported slab-out-of-bounds write in dbgfs_rm_context_write[1], and adding a selftest for the bug (patch 2). [1] https://lore.kernel.org/damon/000000000000ede3ac05ec4abf8e@google.com/ SeongJae Park (2): mm/damon/dbgfs: check if rm_contexts input is for a real context selftests/damon: test non-context inputs to rm_contexts file mm/damon/dbgfs.c | 7 +++++++ tools/testing/selftests/damon/Makefile | 1 + .../damon/debugfs_rm_non_contexts.sh | 19 +++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100755 tools/testing/selftests/damon/debugfs_rm_non_contexts.sh