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 B2C99293C64 for ; Wed, 18 Jun 2025 11:14:32 +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=1750245272; cv=none; b=Q0sXbwSMaQuS9mJpwULVthBCOfcng6K5b33Zqrlp4FZ0aRDFtz2qWHe0M3xOarE+fCm0Unq8tX1AFIs0uu0QNnkkZBri+hUgKsNYK5NOiSudCEIZB/jdFl+n+HcwkNYYGcnVTfsCQ4HTUoxrLUUIgY7Cg8oE9INFXdO23jc0ibU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750245272; c=relaxed/simple; bh=5mI3h7x1U3AJDZx6/RmSZUaUcV291CDtMvd6B0SiWyw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=nAoCFAKcoW8RyF5YskG0JuJKcjfdRcZqV/xLFhqmuoF+trgxNl9WaqeV1TUHGlPJgyTEqJxXrOtRDJAbsx6qgOvKGCySXy0x68Nlxb5fP6v7I0QvxMzt/zJBnJ3kPooj5oJojGuaIYt4XAI0SEhDcm8tchoVEjBHnWHf2zzC3cI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=JwmUD6Oo; 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="JwmUD6Oo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 146B7C4CEF2; Wed, 18 Jun 2025 11:14:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750245272; bh=5mI3h7x1U3AJDZx6/RmSZUaUcV291CDtMvd6B0SiWyw=; h=From:To:Cc:Subject:Date:Reply-to:From; b=JwmUD6OorXrE3pn8D3w/m3T5nVPYUtgPA8KUlcdYPRoprKtUv9rpD+GU+urBbTx7l xgdED5cv0ZEN9wuomYuUdt4qKMNdWQBcXwK+4Di+3J/5N10odKj9rxRyCbs4apPOuk ppdFxEArm0GbjHvoxEpme2zSr8HkI9/Btmldjy2U= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50182: media: imx-jpeg: Align upwards buffer size Date: Wed, 18 Jun 2025 13:04:07 +0200 Message-ID: <2025061833-CVE-2022-50182-c355@gregkh> X-Mailer: git-send-email 2.49.0 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=2740; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=9/V5y8IJQfqd2JDFMcz9dLPZx6GjhbGMZopjI9H5EfE=; b=kA0DAAIRMUfUDdst+ykByyZiAGhSnI2hu7ZZBWkPMLcR6O3ysEJQ7q/RWkFlIDBix7+BvOVzz YhdBAARAgAdFiEE9LYMxb94wiFKMT3LMUfUDdst+ykFAmhSnI0ACgkQMUfUDdst+ynSCQCeMlmm 1fNvW1fYTKuEV/78bPBFNGwAoKZbtjNtcLEmokkAinnro9rDKljD X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: media: imx-jpeg: Align upwards buffer size The hardware can support any image size WxH, with arbitrary W (image width) and H (image height) dimensions. Align upwards buffer size for both encoder and decoder. and leave the picture resolution unchanged. For decoder, the risk of memory out of bounds can be avoided. For both encoder and decoder, the driver will lift the limitation of resolution alignment. For example, the decoder can support jpeg whose resolution is 227x149 the encoder can support nv12 1080P, won't change it to 1920x1072. The Linux kernel CVE team has assigned CVE-2022-50182 to this issue. Affected and fixed versions =========================== Issue introduced in 5.13 with commit 2db16c6ed72ce644d5639b3ed15e5817442db4ba and fixed in 5.15.61 with commit 9ae2d729de6350c53a06c57782751d84eb2c08d9 Issue introduced in 5.13 with commit 2db16c6ed72ce644d5639b3ed15e5817442db4ba and fixed in 5.18.18 with commit 73d1836ed7911953182b787745cb8c5857a2661c Issue introduced in 5.13 with commit 2db16c6ed72ce644d5639b3ed15e5817442db4ba and fixed in 5.19.2 with commit 447795ffb17cd60bb544e0abfc9399e180a14a2f Issue introduced in 5.13 with commit 2db16c6ed72ce644d5639b3ed15e5817442db4ba and fixed in 6.0 with commit 9e7aa76cdb02923ee23a0ddd48f38bdc3512f92b 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-50182 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/nxp/imx-jpeg/mxc-jpeg.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/9ae2d729de6350c53a06c57782751d84eb2c08d9 https://git.kernel.org/stable/c/73d1836ed7911953182b787745cb8c5857a2661c https://git.kernel.org/stable/c/447795ffb17cd60bb544e0abfc9399e180a14a2f https://git.kernel.org/stable/c/9e7aa76cdb02923ee23a0ddd48f38bdc3512f92b