Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2084356rwb; Mon, 7 Nov 2022 09:00:40 -0800 (PST) X-Google-Smtp-Source: AMsMyM40f8/XCcwuZcrMF6oxyavXerLElY9mjggQtnwC5zpZo0frALU/NMsuKt9ZIXmc117mrGK5 X-Received: by 2002:a17:906:504f:b0:7ad:fc14:fed2 with SMTP id e15-20020a170906504f00b007adfc14fed2mr28894404ejk.611.1667840439845; Mon, 07 Nov 2022 09:00:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667840439; cv=none; d=google.com; s=arc-20160816; b=ltgvwfhhLoWGq3xWaQ4vG1GkAK1RvhPXQTmtles9h81Vw6Kg5Ppe99CaYW5g6bUPlj iYHZbw4gudzzRds+MyJptrcvPV5L97+T1ll4tflMMsuKgRehfyOc2sy25hBLmJhOVJpX dmueGK7Q9aTFrWftl1mLz833xx+98grpAYz4IyURSUsZqPAtmf9kTKuySFzObtKhfL6E pjn3Rdf2grGetb49DVLI7MB1QlNh0jRNNCqhh2UqTiI8RXjMliKhVlxEbi72Y4AiWiTF X4mr+xeJbe1MnKbBC6m3K3uiZP8TCmNJFF3AgQh+JkAyUNEEGGOBC0C74PvYt7AWD+s2 /UbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=/g+rNC97SS6ZLBI32M2hXurqEqPSG9LiinS0ajJjqwI=; b=R7DaISp1OfRCNL+Yicyl4yeTBPjE7nPLEGppQTuhFuXjoLax360Lj94Pfqx0I8bgc/ WoZ2N6JohaL8NC91V+JEkUcPDi9T+mG8xM/pgNZvVMtpKwTow3fYzf+nWGKwu/xgtChM ENMuwxlhejn7aGPOyzZypClJMW4BEylGsecLwMYRoMHszyJ60y5VbtiT9fgeWuOQygQd Hk/K4cr5B4Cvc6kEWnwGQXFIf55u7WWz0JlXsx8b/TcVDFlWjyVj7uIbt+A6sXFz1WJk 5NfH6m6pwPeYYTOE7XoLW+CeW6BSW3zSD0oeuXDnwfkkySoS5CfEpliy+Rd2hk/Xtc94 uUdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=myvoQ3iq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ga19-20020a1709070c1300b0078e9ca562d8si9979406ejc.879.2022.11.07.09.00.15; Mon, 07 Nov 2022 09:00:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=myvoQ3iq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232344AbiKGQuP (ORCPT + 92 others); Mon, 7 Nov 2022 11:50:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232604AbiKGQuG (ORCPT ); Mon, 7 Nov 2022 11:50:06 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BEDE20340; Mon, 7 Nov 2022 08:50:05 -0800 (PST) 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 17FC0611BD; 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- 2.25.1