Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1330258rwb; Thu, 1 Dec 2022 16:03:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf6CahaeUaXXnNzNYLOg8n06gp6QPe0X5THKRqHlBtPWebaA1x55ERgMK4LAijFjf60AKDtr X-Received: by 2002:a17:906:c303:b0:7ad:95d2:9df2 with SMTP id s3-20020a170906c30300b007ad95d29df2mr11510743ejz.607.1669939390456; Thu, 01 Dec 2022 16:03:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669939390; cv=none; d=google.com; s=arc-20160816; b=YRa+cIcDh5bbmBMsvq7BhYQKNZ+/cqKyK8ZJi7lADg2sC3DeBGiFos67JxRf6f9wWp PxfFbmKFLhpbXb0WPRJTrl98BVikqw8w632gPMRcjnypCiD83qoaL0EDW60fI+yS0yOs hWcw1DpiZsRMDjzpcdgLBy/2xnEJuaHrDAPr1Yzmpk9rt49Mka7Vc8wG4Xe1kRyrNc1C wInzZddlbCgoPHHWxbFl7y4zEQhYM8zcKe0qpo/iMEZEWbues4FKKJ8XhU0ZXuF6SR2p t4MSfjvpEV3W1xeJ24b0Q1W1OTMDsAQU4RwgX86O/zYGryo6QZNiKdMZagCoW2uJJ7cD qfZA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LYaAuz+w4vdYZfsYDz+oOuvKR/cpiOgie6VFw1LV4mQ=; b=t21ipUIZlJNVYlOexw/GJPFd3px/EReGRrhbIZ4mVm8zyMvcyRj7FQOCAY7fGwTIM4 qOxe9x1dpWs7qJbDDeZqb4vLw3tfjTNgM7aUbup2BL3iS48L3D1NJsHl3ndy09fwQYZH 91LgC2c6PSDJ5i2++zXpXGT1+EmjRHhStG0WsRa8EBzQmijh9SOVe9gsv+pHzUBuXrEH Y6UlSBIbimsQ/FtDVhK1/gLdfNYnPzOEFibpHH2QJ28INh4MgJuJ8oJW9wUy79W2lQcU RRF3ikfziU2m0coU5Zfe4Up1kThD6MulRTm6iDDZO634A6sWsbKdjbX5IU3JxhCiyN9M cihQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=avvaovpY; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a14-20020aa7d90e000000b0046c11dc4cb0si861384edr.571.2022.12.01.16.02.42; Thu, 01 Dec 2022 16:03:10 -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=@chromium.org header.s=google header.b=avvaovpY; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231481AbiLAXmn (ORCPT + 81 others); Thu, 1 Dec 2022 18:42:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230484AbiLAXml (ORCPT ); Thu, 1 Dec 2022 18:42:41 -0500 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6803EAA for ; Thu, 1 Dec 2022 15:42:38 -0800 (PST) Received: by mail-pg1-x52d.google.com with SMTP id 136so3017428pga.1 for ; Thu, 01 Dec 2022 15:42:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LYaAuz+w4vdYZfsYDz+oOuvKR/cpiOgie6VFw1LV4mQ=; b=avvaovpY8709YgS64snIHQSwqeg7ys+GMPllTNmQzhGERBABOksdBT3d0/KsXrOCRm KAL/6xZ+mrMu3Nz45MnWX4Jxu0tWzPyxDxHSBbDg9gidsIZFBJYefstX0lfeSG0eaC6k 8r0GZ4aieiFN8L2baEya7A3N0wv7qWbUxodS8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LYaAuz+w4vdYZfsYDz+oOuvKR/cpiOgie6VFw1LV4mQ=; b=KFwf+Oref+4Sl4QDOZ15HXOj8LIB5p36KkQZn/mi5EY7zkuU/in4KP6UkVqwbshV1Y wKgsyFLgRl2MmhPi9PtY5LZsMXSYFdJ4knzAV8dZ3F9v7ZHfbuD1mCIIM66OxrcjqM6m +sA0W36cHkfpDUqEZg8bTEqVo2QLWrB+fqioK+LI8NEQC0A9vsKqwBLZyI3PBN1tixhK YaGW00dxADUlsM89OfsyltPlfa3+hbFrTlax//dGR+qZGdnlxAupen3FPlwH0d5/tLEx AlXlu8eat7177w7iYUrtGiIVrfGiI48gYRCDZGWcG1K3Ccs14t/EJvvBL0ennUxOe9Kn YIlw== X-Gm-Message-State: ANoB5pnkqsKQVdpuMpLjp1FTiH3Y5GAUWA0iSFHeUzWlZLgVBF+lLj8X agXE7KpmHuEZZmo8/owIrPdcHw== X-Received: by 2002:a62:60c7:0:b0:56b:94f5:400c with SMTP id u190-20020a6260c7000000b0056b94f5400cmr49309464pfb.31.1669938158427; Thu, 01 Dec 2022 15:42:38 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id z1-20020a1709028f8100b00188fcc4fc00sm4198248plo.79.2022.12.01.15.42.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Dec 2022 15:42:37 -0800 (PST) From: Kees Cook To: haifeng.xu@shopee.com, brauner@kernel.org Cc: Kees Cook , elver@google.com, oleg@redhat.com, ebiederm@xmission.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, peterz@infradead.org Subject: Re: [PATCH] signal: Initialize the info in ksignal Date: Thu, 1 Dec 2022 15:42:28 -0800 Message-Id: <166993814728.941514.14527504091820169396.b4-ty@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221128065606.19570-1-haifeng.xu@shopee.com> References: <20221128065606.19570-1-haifeng.xu@shopee.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 On Mon, 28 Nov 2022 06:56:06 +0000, haifeng.xu wrote: > When handing the SIGNAL_GROUP_EXIT flag, the info in ksignal isn't cleared. > However, the info acquired by dequeue_synchronous_signal/dequeue_signal is > initialized and can be safely used. Fortunately, the fatal signal process > just uses the si_signo and doesn't use any other member. Even so, the > initialization before use is more safer. > > > [...] Applied to for-next/hardening, thanks! [1/1] signal: Initialize the info in ksignal https://git.kernel.org/kees/c/935d428bb528 -- Kees Cook