Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp79568rdb; Mon, 4 Dec 2023 21:44:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IFtBIjZMoGBFObTDIupMu8UymkgCzMssnoRqvZ8/i0l8QD3FJoyziIm7KbQguQJhU9ot6/P X-Received: by 2002:a17:90b:295:b0:286:7ec2:e503 with SMTP id az21-20020a17090b029500b002867ec2e503mr707029pjb.17.1701755066555; Mon, 04 Dec 2023 21:44:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701755066; cv=none; d=google.com; s=arc-20160816; b=0dhjiYLcNEqIrALsJChzKsHKQHDhfECgmdkvujFgBTPHy1rV725/sIOIChLeJ2mKX9 DVGtKL/UX75aIQ1isd9ipcoCQ2/XdkK7AYLikLde+akUj3RNTP3+aOdkcB/fR8VLT0kg uZlAoY4meMkt0m9BajQMh7liPRDHOKpWdgKbdrFcEsUlz0He0Pw3S7I74jiJ5tuw+0GC /NIMOQ8h3JmtjX4HB28C9Sgo4s1oNyMJBWyEIXBm9SeFOJJj6X6st7IPnjFB9oCh4mAW kRUPb5l2IDgVzGveBHC6kCkIMRol0j54MqjNGHx40d/S2LlqxxegDib8o7/p3p79yMx9 JjSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=mRb7xFsPGPOcQr70Y646igDQeTsMEFmwOCx2p8B3wDk=; fh=K5tbeNBbrortysijRw/cbbjK1x3L7qKOTJbCrSKRBUM=; b=tpg+3fZPoeUgbsAZCG/00Bu7Sdh3WuIPH/jRBFCLhNoseP6o4tg+BQzDXw5ufzEB/r wt94Jj65Bfixc5QnFbJ+pYwY0afjw1yCPXAWoE0DR5LRUDLJelhzbqVMk2+t1JBsMgQB Yz71PPDMewm4RCG/AzMC9/s4wjviudHVTruuhuc/iEhHXA8fENMDeyOAjGnD33nVoOmm PwjUC4Oid32xkfd48eDV3LOuLQA1hsDXy2sjXxvuCHfdFIdtxHVylcrboWftcsFS6dtj mKj0MRuxTae8Ed2j9GarbbC7hDl0UKA5wpJoMBuOhN6IUtgopgxxVAR9ukrzKSYW+HY2 KsMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=OXFcYcad; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id t6-20020a1709028c8600b001cfa22e6bd7si8960754plo.179.2023.12.04.21.44.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 21:44:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=OXFcYcad; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 168948043937; Mon, 4 Dec 2023 21:44:24 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230074AbjLEFoO (ORCPT + 99 others); Tue, 5 Dec 2023 00:44:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229611AbjLEFoN (ORCPT ); Tue, 5 Dec 2023 00:44:13 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A82D10F; Mon, 4 Dec 2023 21:44:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=mRb7xFsPGPOcQr70Y646igDQeTsMEFmwOCx2p8B3wDk=; b=OXFcYcadr22LLBCAH0u0bB6miD CYzgc3Vgv8AqGQoH8GoyA+TJ6AmilWwPB01/7Yb3gqRnbZQS9ve1jAD0zCpaGgPUMABKL7R/CCPdY dIXeyyeieZxKFqhUewym+rrUNyfj2sfwwMi9/PZ/Rggr4V1FV40NPebnxgfd96FpDyFCLEPvGIcKh DcIZihEraHyGDtAht0+8QHmCwL/oi9Nx0cuzADc4h7RzExCSvMs05mYdl0iKZRiabo9vWZsrHxqt0 K5xSezNSm6nCrV5tIF1dsQDN6dOxEGLKlPT8H+fmAOMidqXzVBzO2W3AgSx9U/q8pxrz7dHeKxPBy Cbtpr5dQ==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1rAOE9-006KQC-32; Tue, 05 Dec 2023 05:44:13 +0000 Date: Mon, 4 Dec 2023 21:44:13 -0800 From: Luis Chamberlain To: j.granados@samsung.com Cc: Kees Cook , Iurii Zaikin , Shuah Khan , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org, kernel test robot Subject: Re: [PATCH 0/3] sysctl: Fix out of bounds access for empty syscl ctl_tables Message-ID: References: <20231121-jag-fix_out_of_bounds_insert-v1-0-571e76d51316@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231121-jag-fix_out_of_bounds_insert-v1-0-571e76d51316@samsung.com> Sender: Luis Chamberlain X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 04 Dec 2023 21:44:24 -0800 (PST) On Tue, Nov 21, 2023 at 12:02:17PM +0100, Joel Granados via B4 Relay wrote: > Fix an out of bounds access reported in > https://lore.kernel.org/oe-lkp/202311201431.57aae8f3-oliver.sang@intel.com > Make sure that the ctl_table header size is greater than 0 before > evaluating if a ctl_table is permanently empty; this evaluation accesses > the first element regardless of the size. Adjusted the ctl_table_size of > Permanently empty ctl_table registers to 1 as they the check now > requires them to have size greater than 0. Added tests for empty > directory handling; in response to the path followed by empty ctl_tables > changing slightly. Clarified the results of sysctl self tests to more > easily identify which ones are OK, Skipped and Failed. > > Comments are greatly appreciated Applied, thanks! Luis