From patchwork Wed Mar 13 18:07:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 13591783 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9814AC54E66 for ; Wed, 13 Mar 2024 18:08:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=8SYylXSrcx8ZyYQJr7nMtAcGBQnI+99AsTM5mXkd2QU=; b=nwdL2rIvHGTPO1 sGFX1Ex3ueNwPmvtKtBV2aoCFjS9W7kE4AxnDM+SI/z9RhhuEf9Pa//MFcZMMRW+dCFu3KDK+zb8c sVN9wG4RLIA+r5AeWThNiCd+xmMemEiuLmDSw27SRkkznKDwAkdvF5oH0kIPEM5fwVixSxKCFxiyI hwDFi4ZrIZeX8hgCQsSb4i5B4lKRtKT0NRc0LSTFKVkXH0NMYs4aoZGLaQU6Cnev66WTO3/acuXWL vQUdW01Xo1mKQP/yloZ2w1AqO8hGg8qXolMhDsmTAlv1k+eQd18xyBp+lihHzW/8i44skiIQqIJjE wpH3FPA2o3ETvQol2sQg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rkT17-0000000BDvc-1E9C; Wed, 13 Mar 2024 18:07:53 +0000 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rkT13-0000000BDuN-3vBp for linux-arm-kernel@lists.infradead.org; Wed, 13 Mar 2024 18:07:51 +0000 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a46623ed901so18239266b.0 for ; Wed, 13 Mar 2024 11:07:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710353268; x=1710958068; darn=lists.infradead.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=oMXTFuaRy2/DahWa3k1XzhwntrhYB+tFZxVYLm3/Iu0=; b=YpWMXX6dY7zrGL/E+s5BKd9Z0zUxfWCWc118qEHuC68/SPhWx5Xy0pTA5EL/nidvNj NLfCuQFgv3HTfNxo8VNTtMfGWHPjKnLN7kXy9TQLBMphTL4Kp4BAVYx7GljUS/NPWS4g Z8//lkQiDIVDb/u72YV0Zfs4wKuifAlBUnQKzQHRarq9FRO5A6jNURSuWarrFwN5mnq4 rYHC6uL3BKp1Jlcz15z01tWdDShTr/4hNBTOXJJcvNi9grIbU0Q2OPq6gcBS8yd6QJvr yme8axuRCpJrktZO0Gh+HjnC0lK5tuy6bTWDVT4citOAE3YNnVxBckllyhqm212Kk/n2 GGEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710353268; x=1710958068; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=oMXTFuaRy2/DahWa3k1XzhwntrhYB+tFZxVYLm3/Iu0=; b=Tv5DHyHcxiHMeWSEC1V2+iCQmvnOImr5py1TRQaq6W9EP03Cx8xtW93eq6B3ruJsXp w1K1gMKt+Ntp+OnogNYNd/SPGuf7yrUo0Jr+ojGLC7PLyHr1nPZ7HMz7ZqYzfUO3Eraa cXu3UrvH2eGkmjvuTX+Vl1PoCnIrKCUK+MEkDtBk+Scjk2NXlhlLOuDFjKmCyGlYL3oQ IZVkN5m1NdeqEPyAao9FtGSq+n1+Td5WKbC4n19UX066GBWEbst9DIvEs4/saHKCOY5h 0Ypy7l9jCxlWjyow5HNSpZi3U4ovBFzGrATm+OB0n7+oBHRWfEYkFyF/sTzBCeUoec9X T2yw== X-Forwarded-Encrypted: i=1; AJvYcCWrgq+unXx2M9Xi/qiYi00XKE1d8BN+wr2FMPRk/HmB2yDlKvHgIMs8gECV1JpBOXTzPnB+dny2B0uuIE9TiTgI0dvCez1doxq4uDL5oNtev0Qy0es= X-Gm-Message-State: AOJu0YyHaYgYe4FpFX239oy+tN7H9PSA3oR9mjtfTPSC0JDrTiKb7P7M KFyp2+Fddlji/jFKBOtG2XVe6gUovXRuUk1X5WWHAbafIV2qJDq7Ahgp3zQqzsU= X-Google-Smtp-Source: AGHT+IEiATRc7GICOzHn/pmaYtsR17HXLdNvPrWgb7fWYxoAe+7+fLoFXGr/dxWbtiPy38J6/6/nCQ== X-Received: by 2002:a17:907:9918:b0:a45:d040:2a2f with SMTP id ka24-20020a170907991800b00a45d0402a2fmr7695229ejc.29.1710353267621; Wed, 13 Mar 2024 11:07:47 -0700 (PDT) Received: from localhost ([102.222.70.76]) by smtp.gmail.com with ESMTPSA id h27-20020a170906399b00b00a3ce60b003asm5124787eje.176.2024.03.13.11.07.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 11:07:47 -0700 (PDT) Date: Wed, 13 Mar 2024 21:07:43 +0300 From: Dan Carpenter To: Eric Anholt Cc: Florian Fainelli , Broadcom internal kernel review list , Greg Kroah-Hartman , Arnd Bergmann , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH] staging: vc04_services: fix information leak in create_component() Message-ID: <2d972847-9ebd-481b-b6f9-af390f5aabd3@moroto.mountain> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240313_110750_002946_F6CFAA64 X-CRM114-Status: GOOD ( 12.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The m.u.component_create.pid field is for debugging and in the mainline kernel it's not used anything. However, it still needs to be set to something to prevent disclosing uninitialized stack data. Set it to zero. Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.") Signed-off-by: Dan Carpenter --- drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c index 6ca5797aeae5..4c3684dd902e 100644 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c @@ -939,6 +939,7 @@ static int create_component(struct vchiq_mmal_instance *instance, m.u.component_create.client_component = component->client_component; strscpy_pad(m.u.component_create.name, name, sizeof(m.u.component_create.name)); + m.u.component_create.pid = 0; ret = send_synchronous_mmal_msg(instance, &m, sizeof(m.u.component_create),