Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1908939rwb; Wed, 26 Jul 2023 22:16:22 -0700 (PDT) X-Google-Smtp-Source: APBJJlFyVh/A7TzKbBa0V4PGjy+NK+aM+P4DjhpjpCoPounzCcz9clATratpumG5rF4gbrp58pFS X-Received: by 2002:a05:6a20:9698:b0:138:834:5dc7 with SMTP id hp24-20020a056a20969800b0013808345dc7mr4107173pzc.30.1690434982494; Wed, 26 Jul 2023 22:16:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690434982; cv=none; d=google.com; s=arc-20160816; b=PWCu8DlgQn/dxoVKaJVB+NTbFKvPUkYAw7r5gj5Y9XFAXL7nxscHlBlaxOKNOhV+ze T0HRSZ6KMpl4h3UKvxibiDG/4g5BJCfTe/OZWV2BeClpIYe7olS7ZNOfTLNyALEn+xv5 apNJqtTWnEPBabdJLF8dL/0Nn7O9qv9Pbj0E9FS0FnUwQBRk5qdGo33h3UBA20CVcXdL 1TK152G/yTYLhqpCaGQtIyEIk9O7HpYHygMp13pnp0xjzQUlZTAGzX5Bpp1D9h3gOHMk I5LOLR2yYrxm8WqkWIRdQGhiAohRwFwCiGANOgl3oX43d9pOEoosN9kE53w8Ac+/35Mw 3jBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=13eapLMbdNZ7fvebi6P7UJIcQyxVB+Q/MG0aOqnfxwo=; fh=aERS7UhNCg5VDO9Zv+DFEWtPOgX18bF4gUQzl2OCm74=; b=wiseWjfQ7lIElzM7r4VF/XrtDfEU9MbHSkKP2mp4mW7l9FEjUT15txdxPnALoLdTgy GuL3CfoaHzOSa4JHHjhL8fpBx43MGIngtSJiLnd48MEQAdP4fGKHTOO+NI9rm/mTstgQ LYaJ0oeOvLEu5ay5A3hpAnoU5qUt/mrC4N4KTPjMIKx37doiIsBlLx3AjWStMUis57Ol DiaUKcg/5btdxcVZm/KmZLH2VjwlnI3trtgVEEvzHwrmujqwxTIsEI22IJYpYMrM0Reo kSKNZK3PPJMfCh8x6wiCRX+HNIb3mZN03jnYOg7VMguIWUTWqLLLQbwzL04h/3UatMNV gnww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=js8a6UH9; 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 cw7-20020a056a00450700b00675e1bc6133si728305pfb.47.2023.07.26.22.16.09; Wed, 26 Jul 2023 22:16:22 -0700 (PDT) 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=js8a6UH9; 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 S230232AbjG0E7K (ORCPT + 99 others); Thu, 27 Jul 2023 00:59:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229820AbjG0E7I (ORCPT ); Thu, 27 Jul 2023 00:59:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C2AAE47 for ; Wed, 26 Jul 2023 21:59:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0F5EC61D32 for ; Thu, 27 Jul 2023 04:59:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3CFE3C433C7; Thu, 27 Jul 2023 04:59:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690433946; bh=nI3Z9E6LOhtjoLvillvTW615wdZhZT9TfqRBESPyb7g=; h=Date:From:To:Cc:Subject:From; b=js8a6UH9dinR7AIi+YwNglSjbd6sFcwWYXFMgJXueedhSrAeN5vww8wXM6VIZzoZe cw+hm2tvfhvHA3BYoLQs5r0N4QaMEHCQnYB4iT0UjeZiRKZ4RIiA/Oy5g0tjDjLgbW 55wyhbb6qXK2G45s7s18Ihczb1IXr+KMbIcg+ZFVd348P5HPtkAYpDKbHYITqS6z08 Wk6bGMfqyRKQUkVirBTYWM83C1VkNKtke21THQs1I3nUw5VX/VGbhuFrWDmhC1CHsx YUJf0xPA0FCEJH8KXmUDTKyF66Nph6dejQgYe90jvwQfrc0HUof3cfVqiB4VnFoQN9 FwyOmxNnnUU5w== Date: Thu, 27 Jul 2023 07:58:31 +0300 From: Mike Rapoport To: Linus Torvalds Cc: Andrew Morton , Mike Rapoport , Rik van Riel , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [GIT PULL] memblock fixes for v6.5-rc4 Message-ID: <20230727045831.GB1901145@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Hi Linus, The following changes since commit 6eaae198076080886b9e7d57f4ae06fa782f90ef: Linux 6.5-rc3 (2023-07-23 15:24:10 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock.git tags/fixes-2023-07-27 for you to fetch changes up to 9e46e4dcd9d6cd88342b028dbfa5f4fb7483d39c: mm,memblock: reset memblock.reserved to system init state to prevent UAF (2023-07-24 08:52:56 +0300) ---------------------------------------------------------------- memblock: reset memblock.reserved to system init state to prevent UAF A call to memblock_free() or memblock_phys_free() issued after memblock data is discarded will result in use after free in memblock_isolate_range(). When CONFIG_KASAN is enabled, this will cause a panic early in boot. Without CONFIG_KASAN, there is a chance that memblock_isolate_range() might scribble on memory that is now in use by somebody else. Avoid those issues by making sure that memblock_discard points memblock.reserved.regions back at the static buffer. If memblock_free() or memblock_phys_free() is called after memblock memory is discarded, that will print a warning in memblock_remove_region(). ---------------------------------------------------------------- Rik van Riel (1): mm,memblock: reset memblock.reserved to system init state to prevent UAF mm/memblock.c | 4 ++++ 1 file changed, 4 insertions(+) -- Sincerely yours, Mike.