From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3BC5B14EC73 for ; Wed, 26 Feb 2025 02:00:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740535205; cv=none; b=CfzoMcnZNJHS5OtdMWhefSI5aXRznLbmf2zlSozYiib3/Z/+tmnM8avO0q4PpF4aPusApl4KfIQJ02CD/iBh57JdWcJZ++O7+HnE+D70sY6e2gC3a8SUZl6YGrUAdp/uissXM7xB66h3CsP3AMvJn7JbHRhhWxheOv7x8FRkOqI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740535205; c=relaxed/simple; bh=XmkthIHUqJa8J3U6lEyc1LQ94tmzFTRYdwIRrWRdbcU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=iGW84hmGgqA5XlCdFai32BTVRlvBB4rIoUCQn+4zTu3AVz3nRa4ZdJihAS+1SOHpqu9BvFIpKKuAWH1RYEkphrvTDkjm+SibSnIRuUTq6XMZRR5VyaMmCSHcKdRMVgIYsmWbqmIC3C0wO6OgoTCLpd7kmqsYx0IgmPdc5zHcjtM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=SD1YTw9K; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="SD1YTw9K" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0F14FC4CEDD; Wed, 26 Feb 2025 02:00:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740535205; bh=XmkthIHUqJa8J3U6lEyc1LQ94tmzFTRYdwIRrWRdbcU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=SD1YTw9KOLAqWS+e9kQGfULFipZZn96jru4yKvFtsZ1FXjtgzEugPWmeMDYH9YBpX IAxiEyMRLzxA1EoAJlBUCeoLWbpQ70teR7TPTqEXaCzppI/OTnyEFPwx4jX4HV7cbe 1Hw6nc+FpDys1wfONmSku/cqDSyJfKKlv2+qvLyo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49254: media: ti-vpe: cal: Fix a NULL pointer dereference in cal_ctx_v4l2_init_formats() Date: Wed, 26 Feb 2025 02:57:39 +0100 Message-ID: <2025022627-CVE-2022-49254-ea38@gregkh> X-Mailer: git-send-email 2.48.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2681; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=XmkthIHUqJa8J3U6lEyc1LQ94tmzFTRYdwIRrWRdbcU=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7SoITfhobfXwuudFStL3+0oSluYdinGY+cmMWza+on 8p8bM2CjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZiI8gmGebrV3kd+Zbk9eK4b tClm8YtAfZGEXob5wdcW1qge+R/v8FTOcOMxpXwRnsBgAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: media: ti-vpe: cal: Fix a NULL pointer dereference in cal_ctx_v4l2_init_formats() In cal_ctx_v4l2_init_formats(), devm_kzalloc() is assigned to ctx->active_fmt and there is a dereference of it after that, which could lead to NULL pointer dereference on failure of devm_kzalloc(). Fix this bug by adding a NULL check of ctx->active_fmt. This bug was found by a static analyzer. Builds with 'make allyesconfig' show no new warnings, and our static analyzer no longer warns about this code. The Linux kernel CVE team has assigned CVE-2022-49254 to this issue. Affected and fixed versions =========================== Issue introduced in 5.12 with commit 7168155002cf7aadbfaa14a28f037c880a214764 and fixed in 5.15.33 with commit aa613ac270292e102503e9767882e39200efe608 Issue introduced in 5.12 with commit 7168155002cf7aadbfaa14a28f037c880a214764 and fixed in 5.16.19 with commit 91e2805579ab0783eed53acc2bf9fb553e939004 Issue introduced in 5.12 with commit 7168155002cf7aadbfaa14a28f037c880a214764 and fixed in 5.17.2 with commit 1381f1a629a090c251965edb56f849ad648414a4 Issue introduced in 5.12 with commit 7168155002cf7aadbfaa14a28f037c880a214764 and fixed in 5.18 with commit abd77889851d2ead0d0c9c4d29f1808801477b00 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2022-49254 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/media/platform/ti-vpe/cal-video.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/aa613ac270292e102503e9767882e39200efe608 https://git.kernel.org/stable/c/91e2805579ab0783eed53acc2bf9fb553e939004 https://git.kernel.org/stable/c/1381f1a629a090c251965edb56f849ad648414a4 https://git.kernel.org/stable/c/abd77889851d2ead0d0c9c4d29f1808801477b00