From patchwork Fri Nov 27 10:05:10 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dickson Wu via B4 Relay X-Patchwork-Id: 106202 Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.900.1795831135728322674 for ; Fri, 27 Nov 2026 17:58:55 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20260515 header.b=WImTgzUI; spf=pass (domain: kernel.org, ip: 172.234.252.31, mailfrom: devnull+dickson.wu.certik.com@kernel.org) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 87D5E41619; Sat, 28 Nov 2026 01:52:24 +0000 (UTC) Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1795830744; b=WWYQoSNa01VbG0oUzCfI4I7AtjLIBItP2d8fGBSK5Gmtm7GlvXAvhSN65D9CQ+Iwrko2 zbbpN9eF5bQiuEK3oL/BDZv2D4bf3EERhZ/HvG0eooebkpRMyAA81Y1j/pYOVV3HfhWUZ f7aJhmDgZGR6mTsjYUtpVjD6t7IM/XoRSKF4Ank0md5P4GyD6gq2xHHddMx2cGFmVlman dG69KiTpj3bPzWxz1w1MD8PY0vEl+Z7kT1OglCnk857Ujn+SxDQExPEq3GT92JdPdMwrJ 7rU8ZCm3btAY2Jzlx49rzgz7BHqlaOnnwkCCcdcYJveLHUHnArrC4AdiH4flv4WauTQ== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1795830744; h=DKIM-Signature:Received:MIME-Version:Content-Type:Message-Id: References:In-Reply-To:From:Date:Subject:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=tvR/H6nMWnrlNVCaed7zmyxOzlY8skc8BvyY+xwEaV4=; b=PMCHpKz8+yk2Ud42LOllJdRu3szaMvzAjpO1w42ALDuQUNby6kjIX00At1yuQfqa0AbK SU+FP3X3l0PnnM/GQVqU4NdaLMkta7QsxDKcXf4P1xlV7OTspshlp3mY4nRwdn/qQpQ6A h4mQ+0QFnJI2EcMBmfy7lfjqlSaUqRumpB1xu7whW9cvb+raPKQiyzgNnOYdDJTdUnnx6 7VxMJRQlwgTruKH+vBzrWnmLkr5qiMz0sglyE9yACWmgwaQYBN91Mq1iytPcT7IwsWYwE ekzPvkf3CLiQzV6JGbz58KxpJpEXw4Mo8tu9FaAgjxuftqQz7EauHckSgPuAAIK/b4w== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 7CBD71F00897; Sat, 28 Nov 2026 01:52:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795830744; bh=tvR/H6nMWnrlNVCaed7zmyxOzlY8skc8BvyY+xwEaV4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:Reply-To; b=WImTgzUIufw7ODy1KYsfBa9n2sC9XzzGHQHb4Yb27yHDRIsH2EF4ZWwUMenEa0arB ZTUUh1obVImqlD/MNxd7qKz35MMFDI05OzrlitGPi5SLn0/b9Np+bSvIx+nksiyaKI hk3k0eWSdXBwPWKGkNZdVMaOA7NFhJTUr+QdKW76Gh59vHaEbITb4S7m63Dcp9MbmS lHSR6gk0QwtcWgavh2gbFNC7nIV+OgctY0fYaYC8IA67R0583FgbbSbL6a7UBAoRMz jeo3OQ/aOBSS+hyz1stDO+w9mwQPWsFNtWlADmiILoOJs0YDG4fREDG5aWPEW0IJYb USBAuI+6rbOPQ== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 0EB454DF01; Sat, 28 Nov 2026 01:52:23 +0000 (UTC) MIME-Version: 1.0 Message-Id: <20261128-pillow-sg-v1-1-cbcff72e5e81@certik.com> References: <20261128-pillow-sg-v1-0-cbcff72e5e81@certik.com> In-Reply-To: <20261128-pillow-sg-v1-0-cbcff72e5e81@certik.com> From: Dickson Wu via B4 Relay Date: Fri, 27 Nov 2026 10:05:10 +0000 Subject: [meta-python][scarthgap][PATCH 1/4] python3-pillow: patch CVE-2026-112398 and CVE-2026-112403 To: openembedded-devel@lists.openembedded.org Cc: Anuj Mittal X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1795830619; l=3396; i=dickson.wu@certik.com; s=dickson-b4; h=from:subject:message-id; bh=fSK/UbSd/igxvmXLDrbSB6iHAn64lqj+LFzXum8JMyo=; b=aAf/AJrlIJrgHcJNHcwE/8U0pZm1DUFoh3CmKePXz3q91ypgUaNnjLpUqW4pOU76DbRvekhS1 4vtlNMfpsL+BEspgpZobRt+orkwMwEc66YRC/FgijA5PaZg1mtqQpV8 X-Developer-Key: i=dickson.wu@certik.com; a=ed25519; pk=fxH7FS4FdojeJSGLJzgKdfO51Rvr4EW30yinj2mc1vg= X-Endpoint-Received: by B4 Relay for dickson.wu@certik.com/dickson-b4 with auth_id=1647 X-Original-From: Dickson Wu Reply-To: dickson.wu@certik.com List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Sat, 28 Nov 2026 03:30:59 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/133390 From: Dickson Wu Reject JPEG streams whose scanlines are wider or have more components (#10131). Upstream commit: https://github.com/python-pillow/Pillow/commit/242a059aedc1935097d9aa1dc3f099750467ba75 AI-Generated: OpenAI Codex, gpt-6.2-sol Signed-off-by: Dickson Wu --- .../CVE-2026-112398_CVE-2026-112403.patch | 37 +++++++++++++++++++ .../python/python3-pillow_10.3.0.bb | 1 + 2 files changed, 38 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-pillow/CVE-2026-112398_CVE-2026-112403.patch diff --git a/meta-python/recipes-devtools/python/python3-pillow/CVE-2026-112398_CVE-2026-112403.patch b/meta-python/recipes-devtools/python/python3-pillow/CVE-2026-112398_CVE-2026-112403.patch new file mode 100644 index 000000000..eb5d8cf99 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-pillow/CVE-2026-112398_CVE-2026-112403.patch @@ -0,0 +1,37 @@ +From 242a059aedc1935097d9aa1dc3f099750467ba75 Mon Sep 17 00:00:00 2001 +From: Andrew Murray <3112309+radarhere@users.noreply.github.com> +Date: Tue, 6 Oct 2026 16:25:03 +1100 +Subject: [PATCH] Reject JPEG streams whose scanlines are wider or have more + components (#10131) + +Co-authored-by: Andrew Murray +Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> +Co-authored-by: Jeffrey 'Alex' Clark + +CVE: CVE-2026-112398 CVE-2026-112403 +Upstream-Status: Backport [https://github.com/python-pillow/Pillow/commit/242a059aedc1935097d9aa1dc3f099750467ba75] +Backport note: Omit upstream test changes in Tests/test_file_jpeg.py. +Signed-off-by: Dickson Wu +--- +diff --git a/src/libImaging/JpegDecode.c b/src/libImaging/JpegDecode.c +index 116ffd8df49..476197370e9 100644 +--- a/src/libImaging/JpegDecode.c ++++ b/src/libImaging/JpegDecode.c +@@ -241,6 +241,17 @@ ImagingJpegDecode(Imaging im, ImagingCodecState state, UINT8 *buf, Py_ssize_t by + break; + } + ++ /* The scanline buffer was sized from the tile extents and the ++ unpacker, not from the JPEG header, so make sure the lines ++ libjpeg is about to produce actually fit in it. */ ++ if (context->cinfo.output_width > (JDIMENSION)state->xsize || ++ (size_t)context->cinfo.output_components * context->cinfo.output_width > ++ (size_t)state->bytes) { ++ jpeg_destroy_decompress(&context->cinfo); ++ state->errcode = IMAGING_CODEC_BROKEN; ++ return -1; ++ } ++ + state->state++; + /* fall through */ + diff --git a/meta-python/recipes-devtools/python/python3-pillow_10.3.0.bb b/meta-python/recipes-devtools/python/python3-pillow_10.3.0.bb index 240fec967..844892f0c 100644 --- a/meta-python/recipes-devtools/python/python3-pillow_10.3.0.bb +++ b/meta-python/recipes-devtools/python/python3-pillow_10.3.0.bb @@ -14,6 +14,7 @@ SRC_URI = "git://github.com/python-pillow/Pillow.git;branch=main;protocol=https file://CVE-2026-59198.patch \ file://CVE-2026-59204.patch \ file://CVE-2026-112393.patch \ + file://CVE-2026-112398_CVE-2026-112403.patch \ " SRCREV = "5c89d88eee199ba53f64581ea39b6a1bc52feb1a" From patchwork Fri Nov 27 10:05:10 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dickson Wu via B4 Relay X-Patchwork-Id: 106203 Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.882.1795831135736780539 for ; Fri, 27 Nov 2026 17:58:55 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20260515 header.b=f+BlehRZ; spf=pass (domain: kernel.org, ip: 172.234.252.31, mailfrom: devnull+dickson.wu.certik.com@kernel.org) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 2A44A42222; Sat, 28 Nov 2026 01:52:25 +0000 (UTC) Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1795830745; b=meWv+WSx1R01TqlPr3gT8yBagmcfkkd3ZOT0f5N26AO1ceFE33rbMRRR+xrHPzcmP7wJ pGmndOkx8YbN20lN6FeM+GfHcNJpr+/WkoZuqXY8G0wyO0OVf4rfTSaDN+aSikfZRPmzR Lyc1++rGIXwNvvSItn1LH81rAKOjK15JE3FFtpAPck7XIUSSaYZqigKCkOb09olC31CZ1 h2jAte+ZVplKnWWr2Nb8ZvhguefDlmTLa5OWJckCCW0x9rX26MJ+LkQ7nL9hyawyy0qbT jgLyaKmPOIMPEKjM68NJUbexDVExI6cDLWR8meuCeQsgLKPnQXJcWf33BHLgFrVf7hQ== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1795830745; h=DKIM-Signature:Received:MIME-Version:Content-Type:Message-Id: References:In-Reply-To:From:Date:Subject:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=YkA3AGg4MJDyAY/cA/njmOk1aKto6i83/mKdB2MCZ9E=; b=3t37qXl7tYg8X0TL9a3Fj0yIC5nPo3/iLAIopvb7f9GxzfHab0ZP7vnxrkcjkpa2EQuX KWT8/NIt8LqbaiENFVdDBoW8MniRSVY6NQcWXqoz/+tp52gx0htdumqkEysVuKcUeDB+R CKsMPHbM4m2JnBoJxxTT3Skj3k2bb+Q8QBKA8W0/8NN6p77TIDmnCHWwxMXfJxvVrikRG eLKzrO6mm8ysHdLFzbbp/k0QEVwbygJaj5TXIt3pyG1BfFN1dJZrHV/7PfoM1HwzkeFTJ iGjXguPcijSQldzUYbk1xWI2vmgvbTpy5x7QQWyBJlnsvnX54OEmQ94XzX36BtphFmg== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 994241F00898; Sat, 28 Nov 2026 01:52:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795830745; bh=YkA3AGg4MJDyAY/cA/njmOk1aKto6i83/mKdB2MCZ9E=; h=References:In-Reply-To:From:Date:Subject:To:Cc:Reply-To; b=f+BlehRZybjq3mgV25hEYVaoMQvpRurd/ZSTy6d2H3i1itisK5mdQAa3+XDeLbK+9 /BPE8SNIzH2a19ir6SFXT+V8ThZv2uCx8YQupw8FaFcSVQpEi+2ET/wDjiNf1xQWsV uS0tWhzCsD0kfSoW8vMHqIihuBgkC844cOLFo6Ing/nd4zbSCPxD8Ahh5UUBylyUP+ 1rvRro2qleoYyAtpB8hSMfdVtGuLNJwhIAXr/uFm7zZ+W+F80HS+3ZrnvLl5fhGgIz yE/Wn2KqByDTb2GiqNdg8gSRhO5LMgDLQ2wdZa8S7JhJKiIO21rbC0v1+pP/sN+hN9 UTFQrA+qs90aA== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 2BCFE4DF0E; Sat, 28 Nov 2026 01:52:23 +0000 (UTC) MIME-Version: 1.0 Message-Id: <20261128-pillow-sg-v1-2-cbcff72e5e81@certik.com> References: <20261128-pillow-sg-v1-0-cbcff72e5e81@certik.com> In-Reply-To: <20261128-pillow-sg-v1-0-cbcff72e5e81@certik.com> From: Dickson Wu via B4 Relay Date: Fri, 27 Nov 2026 10:05:10 +0000 Subject: [meta-python][scarthgap][PATCH 2/4] python3-pillow: patch CVE-2026-112900 To: openembedded-devel@lists.openembedded.org Cc: Anuj Mittal X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1795830619; l=2776; i=dickson.wu@certik.com; s=dickson-b4; h=from:subject:message-id; bh=16Rh8FWN4l5+tnO/L2TgvGdspo0bZ/e/VtaB726qM/Y=; b=hRs4fAAq0lBqyh0N38dY6ZT+tXB31RA1RIk72oQmBDxLTfuIH9Bgdo0hYuyeB/jF1YUlLrjEd y70DdJboBEfCGnKqqH+gOydOwnZGPLD0+dEZVJw8NIuZv5kLbRkk3fJ X-Developer-Key: i=dickson.wu@certik.com; a=ed25519; pk=fxH7FS4FdojeJSGLJzgKdfO51Rvr4EW30yinj2mc1vg= X-Endpoint-Received: by B4 Relay for dickson.wu@certik.com/dickson-b4 with auth_id=1647 X-Original-From: Dickson Wu Reply-To: dickson.wu@certik.com List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Sat, 28 Nov 2026 03:31:09 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/133391 From: Dickson Wu Transform EPS file name to an absolute path before invoking Ghostscript (#10090). Upstream commit: https://github.com/python-pillow/Pillow/commit/a2c363141da31a265dd536c945677db4b64f3ec9 AI-Generated: OpenAI Codex, gpt-6.2-sol Signed-off-by: Dickson Wu --- .../python3-pillow/CVE-2026-112900.patch | 28 +++++++++++++++++++ .../python/python3-pillow_10.3.0.bb | 1 + 2 files changed, 29 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-pillow/CVE-2026-112900.patch diff --git a/meta-python/recipes-devtools/python/python3-pillow/CVE-2026-112900.patch b/meta-python/recipes-devtools/python/python3-pillow/CVE-2026-112900.patch new file mode 100644 index 000000000..1d50a3097 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-pillow/CVE-2026-112900.patch @@ -0,0 +1,28 @@ +From a2c363141da31a265dd536c945677db4b64f3ec9 Mon Sep 17 00:00:00 2001 +From: Andrew Murray <3112309+radarhere@users.noreply.github.com> +Date: Thu, 1 Oct 2026 14:44:00 +1000 +Subject: [PATCH] Transform EPS file name to an absolute path before invoking + Ghostscript (#10090) + + +CVE: CVE-2026-112900 +Upstream-Status: Backport [https://github.com/python-pillow/Pillow/commit/a2c363141da31a265dd536c945677db4b64f3ec9] +Backport note: Drop the upstream test change in Tests/test_file_eps.py. +Signed-off-by: Dickson Wu +--- +diff --git a/src/PIL/EpsImagePlugin.py b/src/PIL/EpsImagePlugin.py +index 5eaefe339a5..a3336894ada 100644 +--- a/src/PIL/EpsImagePlugin.py ++++ b/src/PIL/EpsImagePlugin.py +@@ -103,7 +103,10 @@ def Ghostscript( + + infile_temp = None + if hasattr(fp, "name") and os.path.exists(fp.name): +- infile = fp.name ++ # Make the path absolute so that a filename beginning with "-" or "@" ++ # can never be interpreted by Ghostscript's argument parser ++ # as an option or an @-file token ++ infile = os.path.abspath(fp.name) + else: + in_fd, infile_temp = tempfile.mkstemp() + os.close(in_fd) diff --git a/meta-python/recipes-devtools/python/python3-pillow_10.3.0.bb b/meta-python/recipes-devtools/python/python3-pillow_10.3.0.bb index 844892f0c..5f228b227 100644 --- a/meta-python/recipes-devtools/python/python3-pillow_10.3.0.bb +++ b/meta-python/recipes-devtools/python/python3-pillow_10.3.0.bb @@ -15,6 +15,7 @@ SRC_URI = "git://github.com/python-pillow/Pillow.git;branch=main;protocol=https file://CVE-2026-59204.patch \ file://CVE-2026-112393.patch \ file://CVE-2026-112398_CVE-2026-112403.patch \ + file://CVE-2026-112900.patch \ " SRCREV = "5c89d88eee199ba53f64581ea39b6a1bc52feb1a" From patchwork Fri Nov 27 10:05:11 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dickson Wu via B4 Relay X-Patchwork-Id: 106204 Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.921.1795831323018624518 for ; Fri, 27 Nov 2026 18:02:03 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20260515 header.b=W9vyzRM5; spf=pass (domain: kernel.org, ip: 172.105.4.254, mailfrom: devnull+dickson.wu.certik.com@kernel.org) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id D4872611E0; Sat, 28 Nov 2026 01:52:24 +0000 (UTC) Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1795830744; b=UCIGHFwi466CgS5Gx/HDxU4WRSJJPsUths8y+ylPnGAoMa3IehKiMoJXgjK44try+9pE YR5why4irITLBj0J+lwCTOrVdcTeMaoa6wKi4aAOJTgkKB1hMFFsnFHzlhiwi/goIuI5n D1PW1tgIlexfWF0xoD0u98senPw+qA0fZVQ9a/92end8cHY0AvSd3IsngB/MyERk2cgMI fcutAP7UgPMsF7YaX8ByJh31pUwWQpUegtRXSopxXy+Jm/4+/vGXp8efCi7XB66ll26xn A31AwRQBN3q5nFQZjt04nlwjSpBXzjLZbXm3ieDn0FxMREftd4jsi6clxdcHw3hkIIQ== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1795830744; h=DKIM-Signature:Received:MIME-Version:Content-Type:Message-Id: References:In-Reply-To:From:Date:Subject:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=yQ3RvRxuNKlQp/0c5wKJb5lnk+X5Q+pTuXKA3HMX6E4=; b=TuAV67EoJDo5NSCf/N3/gMd2xUWfbbMhMhtkJFhstB3UAq60Plauq1ZaMMnBS7WQglZz oJXYS5v2mffY3wLCaWSoIkmMtytuB2ID36QWWZqogloTn4vWS4VgQnmkEaMhGC5090+Qt 6KjB6WYqL3pdYitsQU045teByuSw/olQmLm44YfsLbtaE16uIhehqYVvQ5zlI2X+3517q 21zrx1mxlS/xIOAt+01ihTAiJqmioIsVFulW514ZREpcpcfcU8alOVutEnb+/Og5q/78u yz6fvh5ySRt71oOMY1YNsrg0ZnD7glsijFwxQZF1HN6WXlVo+BAfL9z2DikJ3hPdUPQ== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id B9CDC1F00899; Sat, 28 Nov 2026 01:52:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795830744; bh=yQ3RvRxuNKlQp/0c5wKJb5lnk+X5Q+pTuXKA3HMX6E4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:Reply-To; b=W9vyzRM5I/uZjR5aTR5QbBD/H8TvC8vN3XW6UkV1DQEna09xW8xjVcq4hq9h+weWd jJFLQNphy95jA0TmssiFoKNHccTneXES6m3gbrKkBEcjBUq0tast4x+A0MtgNgI1i+ VWgacL8wF3XuoYixCrwVTMgB+09dEcgJta9DuYeYx6nu6CH67x8i6YPFYDgUxlITxW 14CZIS14MK6grYXRzdH72FICyHZqWmymUas+YQnkcN+wjeqLl0GRRS4RHcYVAz9aSr Z/JxV2jieKdfffp6UHeRRZZevBRwxYKZOHu8/mTGYIgmd0G1p1+nWcJ8gOgKIs37fm P/114fubFX+Hw== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 4C0FF4DF12; Sat, 28 Nov 2026 01:52:23 +0000 (UTC) MIME-Version: 1.0 Message-Id: <20261128-pillow-sg-v1-3-cbcff72e5e81@certik.com> References: <20261128-pillow-sg-v1-0-cbcff72e5e81@certik.com> In-Reply-To: <20261128-pillow-sg-v1-0-cbcff72e5e81@certik.com> From: Dickson Wu via B4 Relay Date: Fri, 27 Nov 2026 10:05:11 +0000 Subject: [meta-python][scarthgap][PATCH 3/4] python3-pillow: patch CVE-2026-112400 To: openembedded-devel@lists.openembedded.org Cc: Anuj Mittal X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1795830619; l=3088; i=dickson.wu@certik.com; s=dickson-b4; h=from:subject:message-id; bh=a/k8HCX+ekskdG/KfwWkFfZ2YntI2rwdfV5RaeQhhqk=; b=yvjDAA7ZIerln8gMZ0nQ4nzLIIBhK0p6ELPQ44KsCbKW/ao5XXaRtuiY56SmL5t+oiA/Qbwqm 2/Z9wN23CcaBpjb+OAQSZ/kEK8BvwrKrJoEngX0Xm5bDB5b+uwYkBN/ X-Developer-Key: i=dickson.wu@certik.com; a=ed25519; pk=fxH7FS4FdojeJSGLJzgKdfO51Rvr4EW30yinj2mc1vg= X-Endpoint-Received: by B4 Relay for dickson.wu@certik.com/dickson-b4 with auth_id=1647 X-Original-From: Dickson Wu Reply-To: dickson.wu@certik.com List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Sat, 28 Nov 2026 03:31:09 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/133392 From: Dickson Wu Do not keep size from failed GIF decompression bomb check (#10116). Upstream commit: https://github.com/python-pillow/Pillow/commit/6faed707cfb760a4cbd726ddc8406f576cf35bf7 AI-Generated: OpenAI Codex, gpt-6.2-sol Signed-off-by: Dickson Wu --- .../python3-pillow/CVE-2026-112400.patch | 30 +++++++++++++++++++ .../python/python3-pillow_10.3.0.bb | 1 + 2 files changed, 31 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-pillow/CVE-2026-112400.patch diff --git a/meta-python/recipes-devtools/python/python3-pillow/CVE-2026-112400.patch b/meta-python/recipes-devtools/python/python3-pillow/CVE-2026-112400.patch new file mode 100644 index 000000000..9608fc18b --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-pillow/CVE-2026-112400.patch @@ -0,0 +1,30 @@ +From 6faed707cfb760a4cbd726ddc8406f576cf35bf7 Mon Sep 17 00:00:00 2001 +From: Andrew Murray <3112309+radarhere@users.noreply.github.com> +Date: Sun, 4 Oct 2026 09:18:28 +1100 +Subject: [PATCH] Do not keep size from failed GIF decompression bomb check + (#10116) + +Co-authored-by: Jeffrey 'Alex' Clark +Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> + +CVE: CVE-2026-112400 +Upstream-Status: Backport [https://github.com/python-pillow/Pillow/commit/6faed707cfb760a4cbd726ddc8406f576cf35bf7] +Backport note: Omit upstream test changes in Tests/test_decompression_bomb.py. +Signed-off-by: Dickson Wu +--- +diff --git a/src/PIL/GifImagePlugin.py b/src/PIL/GifImagePlugin.py +index 48ba0f9deb1..c6b327ef8f5 100644 +--- a/src/PIL/GifImagePlugin.py ++++ b/src/PIL/GifImagePlugin.py +@@ -286,8 +286,9 @@ def _seek(self, frame: int, update_image: bool = True) -> None: + x0, y0 = i16(s, 0), i16(s, 2) + x1, y1 = x0 + i16(s, 4), y0 + i16(s, 6) + if (x1 > self.size[0] or y1 > self.size[1]) and update_image: +- self._size = max(x1, self.size[0]), max(y1, self.size[1]) +- Image._decompression_bomb_check(self._size) ++ size = max(x1, self.size[0]), max(y1, self.size[1]) ++ Image._decompression_bomb_check(size) ++ self._size = size + frame_dispose_extent = x0, y0, x1, y1 + flags = s[8] + diff --git a/meta-python/recipes-devtools/python/python3-pillow_10.3.0.bb b/meta-python/recipes-devtools/python/python3-pillow_10.3.0.bb index 5f228b227..374984d0e 100644 --- a/meta-python/recipes-devtools/python/python3-pillow_10.3.0.bb +++ b/meta-python/recipes-devtools/python/python3-pillow_10.3.0.bb @@ -16,6 +16,7 @@ SRC_URI = "git://github.com/python-pillow/Pillow.git;branch=main;protocol=https file://CVE-2026-112393.patch \ file://CVE-2026-112398_CVE-2026-112403.patch \ file://CVE-2026-112900.patch \ + file://CVE-2026-112400.patch \ " SRCREV = "5c89d88eee199ba53f64581ea39b6a1bc52feb1a" From patchwork Fri Nov 27 10:05:11 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dickson Wu via B4 Relay X-Patchwork-Id: 106205 Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.924.1795831323051496045 for ; Fri, 27 Nov 2026 18:02:03 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20260515 header.b=nZ235/bF; spf=pass (domain: kernel.org, ip: 172.105.4.254, mailfrom: devnull+dickson.wu.certik.com@kernel.org) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id CB10960D42; Sat, 28 Nov 2026 01:52:24 +0000 (UTC) Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1795830744; b=ehVMU9WkSTdnv4SZOJUBVZ+LrWB4j9laXOgThwyDIVUje/Vg/REIjkHDrbZJckT5ujNS SmkNVYWWWKW1Poc6/RIaQky7ktKC8aP3A2QUL+xd19yP1Gppe8Os8N2O00FgUW2/ntCsx VVOpAnGoy7MCDMXi3ZryQ1jDqyiI9irkcECDy1TPMjugAoxij46Go0LG3GLKY8164dC5T qA0PcIimcoLTDwg3hj2zfvJPzCIqxMxexS+aK3jxnHVwM4GhixkpILglBT7Od6PYmkFuN pbShD3Qdxb7qWc/L7YUhtCbgeSWCJcPV22Kl9vSN7TO3Ff2tlP9F3gHFBC60OGjWaog== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1795830744; h=DKIM-Signature:Received:MIME-Version:Content-Type:Message-Id: References:In-Reply-To:From:Date:Subject:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=ED5Emds7XPjNy0wq+GdiNMZPOdMr52H46WwFQ4Fa6oQ=; b=c3HFxLxVPGqlhAzuqZ+KfTgwbVOanjSSew68SpIShb9Muk3vul/SsX2sBpVL/jcoGKMM l1+f0Ow37y7qhAhu1cFfa0vT/KAi6rdMyfmk/QMUyfAeETzkvltPYh9BcFucynUrY83MA KqOWVXbvsT3lu5h/UiclaDROTOkgq/copMvJ+uMEgggLXuY4oEJJESTYoAU7UmwxzPF8k mYTTjwpwUpJOzDNhfe71nDtB7PMQ3CxkxperoleAPcs6hTCgWcxL2q0W46zf7+kRu1dkR Jiy3NWIr1iyHR8lFOIjeoXTabD4DFm97igfmC1+DAhH917b8P7n8jA9Kalj9k5GhZJA== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id D88B21F0089B; Sat, 28 Nov 2026 01:52:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795830744; bh=ED5Emds7XPjNy0wq+GdiNMZPOdMr52H46WwFQ4Fa6oQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:Reply-To; b=nZ235/bFjDIxMBn8tPSkKFlvRxY1d0fZxgqSF3eH+24XuGUoAPvzA5UIZJEVPc4q+ pOmSLoHP88aGX0Vg+sLqBeXu81mNriUHLZWTAKGKHE4HZPY00SeW4OtOWwx5Pnf2y7 ZFHBSPBbTFx0vHWIV80py9AHVPPtFxotMO4xQtPHtt441IYBzdB0VfsFAidrtFSbKb a3NPUOjQkx5mbtQOeuFDXmtlFVkNYgI2VPOZ60oL8RQD0AQuO1lsJ3HrdjUM6kbPnw gQ45ZMZkt7loZIQ08V2KnqqkVRBo+4eTajrRjo5y0mBUTzZeFEXrknKc7FPiNaQkJK f5LCs//5U7gJQ== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 692A44DF16; Sat, 28 Nov 2026 01:52:23 +0000 (UTC) MIME-Version: 1.0 Message-Id: <20261128-pillow-sg-v1-4-cbcff72e5e81@certik.com> References: <20261128-pillow-sg-v1-0-cbcff72e5e81@certik.com> In-Reply-To: <20261128-pillow-sg-v1-0-cbcff72e5e81@certik.com> From: Dickson Wu via B4 Relay Date: Fri, 27 Nov 2026 10:05:11 +0000 Subject: [meta-python][scarthgap][PATCH 4/4] python3-pillow: patch CVE-2026-112406 To: openembedded-devel@lists.openembedded.org Cc: Anuj Mittal X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1795830619; l=2898; i=dickson.wu@certik.com; s=dickson-b4; h=from:subject:message-id; bh=f0f1/8Xs4Bx9GcWebrCzo/t4/bZ2s1JSpSOy0JpVJzM=; b=s0xxUOIqNlKnxTtPY3/MEt64KXjSG9zvaNALzvugZrfJsgelSGfSbrwPAU6ykwvVI3ayMcgeq euyPgrEn4k2DaMbr+TPPrQBrqsHN7JnyCAOnw6J7UmFvOj7Rw0BqsA1 X-Developer-Key: i=dickson.wu@certik.com; a=ed25519; pk=fxH7FS4FdojeJSGLJzgKdfO51Rvr4EW30yinj2mc1vg= X-Endpoint-Received: by B4 Relay for dickson.wu@certik.com/dickson-b4 with auth_id=1647 X-Original-From: Dickson Wu Reply-To: dickson.wu@certik.com List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Sat, 28 Nov 2026 03:31:09 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/133394 From: Dickson Wu Prevent infinite loop when rewriting PDF pages (#10125). Upstream commit: https://github.com/python-pillow/Pillow/commit/b3ebf20c694f2f12537a629c30229a1d5a53f777 AI-Generated: OpenAI Codex, gpt-6.2-sol Signed-off-by: Dickson Wu --- .../python3-pillow/CVE-2026-112406.patch | 26 +++++++++++++++++++ .../python/python3-pillow_10.3.0.bb | 1 + 2 files changed, 27 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-pillow/CVE-2026-112406.patch diff --git a/meta-python/recipes-devtools/python/python3-pillow/CVE-2026-112406.patch b/meta-python/recipes-devtools/python/python3-pillow/CVE-2026-112406.patch new file mode 100644 index 000000000..ab6e180d1 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-pillow/CVE-2026-112406.patch @@ -0,0 +1,26 @@ +From b3ebf20c694f2f12537a629c30229a1d5a53f777 Mon Sep 17 00:00:00 2001 +From: Andrew Murray <3112309+radarhere@users.noreply.github.com> +Date: Mon, 5 Oct 2026 18:12:40 +1100 +Subject: [PATCH] Prevent infinite loop when rewriting PDF pages (#10125) + + +CVE: CVE-2026-112406 +Upstream-Status: Backport [https://github.com/python-pillow/Pillow/commit/b3ebf20c694f2f12537a629c30229a1d5a53f777] +Backport note: Omit upstream test changes in Tests/test_pdfparser.py. +Signed-off-by: Dickson Wu +--- +diff --git a/src/PIL/PdfParser.py b/src/PIL/PdfParser.py +index 5f75cf4d3ee..e7ec6180b6c 100644 +--- a/src/PIL/PdfParser.py ++++ b/src/PIL/PdfParser.py +@@ -502,7 +502,9 @@ def rewrite_pages(self) -> None: + self.pages[j] = new_page_ref + # delete redundant Pages tree nodes from xref table + for pages_tree_node_ref in pages_tree_nodes_to_delete: +- while pages_tree_node_ref: ++ processed_refs = [] ++ while pages_tree_node_ref and pages_tree_node_ref not in processed_refs: ++ processed_refs.append(pages_tree_node_ref) + pages_tree_node = self.cached_objects[pages_tree_node_ref] + if pages_tree_node_ref.object_id in self.xref_table: + del self.xref_table[pages_tree_node_ref.object_id] diff --git a/meta-python/recipes-devtools/python/python3-pillow_10.3.0.bb b/meta-python/recipes-devtools/python/python3-pillow_10.3.0.bb index 374984d0e..d7adf8cef 100644 --- a/meta-python/recipes-devtools/python/python3-pillow_10.3.0.bb +++ b/meta-python/recipes-devtools/python/python3-pillow_10.3.0.bb @@ -17,6 +17,7 @@ SRC_URI = "git://github.com/python-pillow/Pillow.git;branch=main;protocol=https file://CVE-2026-112398_CVE-2026-112403.patch \ file://CVE-2026-112900.patch \ file://CVE-2026-112400.patch \ + file://CVE-2026-112406.patch \ " SRCREV = "5c89d88eee199ba53f64581ea39b6a1bc52feb1a"