From patchwork Mon Oct 6 12:11:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gyorgy Sarvari X-Patchwork-Id: 71698 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9B9DCCA476 for ; Mon, 6 Oct 2025 12:11:28 +0000 (UTC) Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) by mx.groups.io with SMTP id smtpd.web11.32405.1759752683744319574 for ; Mon, 06 Oct 2025 05:11:24 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=E+5yAcb0; spf=pass (domain: gmail.com, ip: 209.85.208.51, mailfrom: skandigraun@gmail.com) Received: by mail-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-62fc89cd68bso10007799a12.0 for ; Mon, 06 Oct 2025 05:11:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759752682; x=1760357482; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=eDMkUpeDUpl2LGuEqmMZ+Wkl88uwo8Gvw7NRf+GG3+A=; b=E+5yAcb0VEXQUyNxCtfpH9Fizv+GhgMU6k3FTzF0xnnSyIspC5Z8EUorYC+4y1XBda lvR0QQHc2wf83P6GPVxr4Bp2pE4k9aRd/tXqJc553ARvI7PYgHeGxWthpg4YWfjNLtzU Cx3oaQwcpRSarHQk/so4iWTDAIf+KF+aWh+jxD8wGEefKDjV1aLWkaKzhchcXs4IIe0z ULTdRlGoUU0TzIxzdS3wbw+7vLhsOaIFyEL4vKEvI8yBPG+BT5xPAyuqMT2qIrrkio/Y WuD9J6In1Fl11Z71i+/LpbtCU729ZYhzDINYebwvWoexwCXD+nsnMiF03g5bWy4/kMHX s/8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759752682; x=1760357482; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=eDMkUpeDUpl2LGuEqmMZ+Wkl88uwo8Gvw7NRf+GG3+A=; b=nkbsYebDGdL/9371uh+G92DOSR/3bMv/t4aMs0UOqH90JJCGaomCLXY766WV0qX4g9 fH06ZkHEP/rB9HkFwp5e4PFB8uOhVyJ4OYMnnQG/6g9XtCWTZmkunNqvszPdpTgqLY7u ewjPa8DCS4EtWqmEhP6jmlXfXNFtyDCeDf3+J2vZS+fmDUzG2kCCtRhHWRkb5kKrsb/t Zkga0BqA3zCqsV2UITlM4avAntkPezLXZ5QKBDva5LE5qtdiLolA9i0/M03d1Ca584eE M4hxVV4Df/LydgbdoY0zNMikvx5AmZkSWzuutXNI1UyxsNLJCVEfnOfbZJT+eHTBxn3N 8bEA== X-Gm-Message-State: AOJu0Ywut4hHv1BwaYOF93v5uHzMswbYztcEaiufF48a8KHYCzhqE6/m 0CkFTwXgxibw6WPGc0IffImZykYudpaDVHOx8WwyRTw+1Bsx3zRwZSdKfsU/Dw== X-Gm-Gg: ASbGnctJ9a2kfJY3yovBdhcoZx+69tqjidrwMB8VKFV1Rs0fI3s+rlnnqb4UJ3cA0Fp sWYh7/UQkykzbGeh1L1xlX0nLJmAz5TOETuD6gTlFMyZ6b1WlhxNaiZ7FaMb921oOoF4po+KgfT Lu7ssSPzEkkK6YNQkcTMhO9puGiaGcyAgv5UaiYhg4eZOKY5VqBTV2oOy/4/zPxZEzIMC994AYp qMs8cjRDb8chAJQ/n7Ihx7LWWDMGH7OHGlgWirX2anJK60BPX538J89jv5lGx8F+0ieRvqXLNVN OGiFLMtLwFeaSbfYU1lAAG+qX/0ZNxQuF76jgCS6fax8p6Xi7LbEoRV8F++ru5qCZ0EbSvtLXbM nM3R4KjhrD71GeOXEHBocxhZapL+1c2R6Em1woLK2uh0jkjzp1zjKqg4= X-Google-Smtp-Source: AGHT+IEjIeDIB26ZXZUa/RM0bNrWhcN7kYLzH2VfxZgyk7awYdCh3nVuNyANCWVabXyHQw39W57N4Q== X-Received: by 2002:a17:906:4789:b0:b04:1249:2b24 with SMTP id a640c23a62f3a-b49c3933062mr1508782166b.37.1759752681860; Mon, 06 Oct 2025 05:11:21 -0700 (PDT) Received: from desktop ([51.154.145.205]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b4869c4fd9esm1134367966b.76.2025.10.06.05.11.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Oct 2025 05:11:21 -0700 (PDT) From: Gyorgy Sarvari To: openembedded-devel@lists.openembedded.org Subject: [meta-oe][scarthgap][PATCH 1/5] emacs: patch CVE-2024-30202 Date: Mon, 6 Oct 2025 14:11:16 +0200 Message-ID: <20251006121120.533142-1-skandigraun@gmail.com> X-Mailer: git-send-email 2.51.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 06 Oct 2025 12:11:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/120285 Details: https://nvd.nist.gov/vuln/detail/CVE-2024-30202 Backport the patch mentioned in the details of the link. Signed-off-by: Gyorgy Sarvari --- meta-oe/recipes-support/emacs/emacs_29.1.bb | 1 + ...et-templates-Prevent-code-evaluation.patch | 47 +++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 meta-oe/recipes-support/emacs/files/0001-org-macro-set-templates-Prevent-code-evaluation.patch diff --git a/meta-oe/recipes-support/emacs/emacs_29.1.bb b/meta-oe/recipes-support/emacs/emacs_29.1.bb index 5cbe4551c0..3701e17025 100644 --- a/meta-oe/recipes-support/emacs/emacs_29.1.bb +++ b/meta-oe/recipes-support/emacs/emacs_29.1.bb @@ -9,6 +9,7 @@ SRC_URI = "https://ftp.gnu.org/pub/gnu/emacs/emacs-${PV}.tar.xz \ SRC_URI:append:class-target = " \ file://use-emacs-native-tools-for-cross-compiling.patch \ file://avoid-running-host-binaries-for-sanity.patch \ + file://0001-org-macro-set-templates-Prevent-code-evaluation.patch \ " SRC_URI[sha256sum] = "d2f881a5cc231e2f5a03e86f4584b0438f83edd7598a09d24a21bd8d003e2e01" diff --git a/meta-oe/recipes-support/emacs/files/0001-org-macro-set-templates-Prevent-code-evaluation.patch b/meta-oe/recipes-support/emacs/files/0001-org-macro-set-templates-Prevent-code-evaluation.patch new file mode 100644 index 0000000000..c88843da59 --- /dev/null +++ b/meta-oe/recipes-support/emacs/files/0001-org-macro-set-templates-Prevent-code-evaluation.patch @@ -0,0 +1,47 @@ +From 7b1f10c152e69a32155c0291b9c8e83a8e28ebff Mon Sep 17 00:00:00 2001 +From: Ihor Radchenko +Date: Tue, 20 Feb 2024 12:19:46 +0300 +Subject: [PATCH] org-macro--set-templates: Prevent code evaluation + +* lisp/org/org-macro.el (org-macro--set-templates): Get rid of any +risk to evaluate code when `org-macro--set-templates' is called as a +part of major mode initialization. This way, no code evaluation is +ever triggered when user merely opens the file or when +`mm-display-org-inline' invokes Org major mode to fontify mime part +preview in email messages. + +CVE: CVE-2024-30202 + +Upstream-Status: Backport [https://cgit.git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-29&id=befa9fcaae29a6c9a283ba371c3c5234c7f644eb] +Signed-off-by: Gyorgy Sarvari +--- + lisp/org/org-macro.el | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/lisp/org/org-macro.el b/lisp/org/org-macro.el +index 481e431..a3b5c6e 100644 +--- a/lisp/org/org-macro.el ++++ b/lisp/org/org-macro.el +@@ -109,6 +109,13 @@ previous one, unless VALUE is nil. Return the updated list." + (let ((new-templates nil)) + (pcase-dolist (`(,name . ,value) templates) + (let ((old-definition (assoc name new-templates))) ++ ;; This code can be evaluated unconditionally, as a part of ++ ;; loading Org mode. We *must not* evaluate any code present ++ ;; inside the Org buffer while loading. Org buffers may come ++ ;; from various sources, like received email messages from ++ ;; potentially malicious senders. Org mode might be used to ++ ;; preview such messages and no code evaluation from inside the ++ ;; received Org text should ever happen without user consent. + (when (and (stringp value) (string-match-p "\\`(eval\\>" value)) + ;; Pre-process the evaluation form for faster macro expansion. + (let* ((args (org-macro--makeargs value)) +@@ -121,7 +128,7 @@ previous one, unless VALUE is nil. Return the updated list." + (cadr (read value)) + (error + (user-error "Invalid definition for macro %S" name))))) +- (setq value (eval (macroexpand-all `(lambda ,args ,body)) t)))) ++ (setq value `(lambda ,args ,body)))) + (cond ((and value old-definition) (setcdr old-definition value)) + (old-definition) + (t (push (cons name (or value "")) new-templates))))) From patchwork Mon Oct 6 12:11:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gyorgy Sarvari X-Patchwork-Id: 71699 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8364CCD182 for ; Mon, 6 Oct 2025 12:11:28 +0000 (UTC) Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) by mx.groups.io with SMTP id smtpd.web10.32347.1759752684531553271 for ; Mon, 06 Oct 2025 05:11:24 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=IBG2mfjW; spf=pass (domain: gmail.com, ip: 209.85.218.44, mailfrom: skandigraun@gmail.com) Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-b4539dddd99so638929766b.1 for ; Mon, 06 Oct 2025 05:11:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759752683; x=1760357483; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=LOd8X4hlWb+B6JSU8cMmw8AMqnopnWgR2K0eL9huOOs=; b=IBG2mfjWxINpu/pj8NqwTSoqVytRC/qhbXBKsUMTQMUc3DfMXeKa9oC+io80rQyZ0Z udWBm25PAqDoXOnB1fZglytl6WNAlboj8lRr+SC/KYM6a+26c2SF1IvrRIoTNFVudtSs 4/hh4k5yQ3xZdn4U83sapdn9hqztYti2mpN95aOinyVN+lB/HiXkl3tfW+KGgJ4+qWx+ 7cuqCMA6W/C+AhD6BT7mc6SJMJwvJISMtR23g6RZRju8/spU4MWf/UBilsUG37MZr0hZ s6MPSSSz0UJ/A41v+lk8Hqqtm2INzEZBl0gp623srdC1gSXYbssQCS2XfJUy82CbmEgI Gzmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759752683; x=1760357483; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LOd8X4hlWb+B6JSU8cMmw8AMqnopnWgR2K0eL9huOOs=; b=oRattByYePMMT3mJyGUOFKQpsgtBhA021kXTeDvnqqLEch0PXYtnkhWZOge62KYmjz jXaBTsrkl1ChmaD6dg5HXUQHPMoSFOEJMe5ZaltIYXtcfWHKZ5zNpKIYIenHSnRSGkfR lJwz/zaiI/s8bhB/yOBk6Bo7R5Ou/EKeBtHOz6oSkj9/Snwz+GoXcbgFn8w1OoBaGL3N DReDUyJcmKzVye5YhMlecAAUJ+Fi0WwhRH1qYEfSPj0ACkuxDjxn/WIIpuID0xzotGVf ngHoFG09O5DsnObYkpScfsEoUWN1eg5RCYKncRqi7Pebegz0qgJQa1mxjWwf3Wtqrabg A0XA== X-Gm-Message-State: AOJu0Yxoh1i/DavTxWcKaYvHOz7wcpUD1u335c+aXNLdN7wYUKmehke9 optW0mBh2Oq3gdYAzPMfRVj8VzwCdCjFnnSagWmJsA/2cTozLRqN1pMd9tZKGA== X-Gm-Gg: ASbGncv4LR+8YPleEZQ7+xV581DVszl49MXc9bvOF6b8sPWCuKmi4lHI8K30CpBFwdS 1a1uqt904L0AeeoHMuaxvDB1Ir1NZWnYduitiRT9/Wn/GuC4rVgrWwWVaOcoH/AqaH39MF8H0UB vE3RIoO7b0RSgqHFY+hJx58R2X3L/eh1XzJ10TPmKDf5ZDh/vGiTSWiFlqmpQDT4+ZDnK1VGHxl 3e0xjv1GPxDvLj457hf3NEewdLTO4l+4/YvaqujX01VHCJsW8HIn2UTiC+eUo0f8IYAq/K7m8ec CDM9XiiRa1kI/Ab70lIxoIbZAxlbjHgeUoMNeLwodp8CQ9RIrdg2JohWN7vyeZL8trLg9OMg4Kp CWu4VfRvCqGfLIpTKDmdou1PsUhGD0gx5WpHPQH0HYG1K X-Google-Smtp-Source: AGHT+IHmfT+8T1uqlIlSlzPSOfSVECkxf3DRbodiOAqJ8uNN5M/EIdiuXnUBGNAJC0UVqYt+KRKcfQ== X-Received: by 2002:a17:907:7f23:b0:b40:e7ee:b5ec with SMTP id a640c23a62f3a-b49c3255f48mr1481874166b.59.1759752682671; Mon, 06 Oct 2025 05:11:22 -0700 (PDT) Received: from desktop ([51.154.145.205]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b4869c4fd9esm1134367966b.76.2025.10.06.05.11.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Oct 2025 05:11:22 -0700 (PDT) From: Gyorgy Sarvari To: openembedded-devel@lists.openembedded.org Subject: [meta-oe][scarthgap][PATCH 2/5] emacs: patch CVE-2024-30203 Date: Mon, 6 Oct 2025 14:11:17 +0200 Message-ID: <20251006121120.533142-2-skandigraun@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251006121120.533142-1-skandigraun@gmail.com> References: <20251006121120.533142-1-skandigraun@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 06 Oct 2025 12:11:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/120286 Details: https://nvd.nist.gov/vuln/detail/CVE-2024-30203 Pick the patch mentioned in the description. Signed-off-by: Gyorgy Sarvari --- meta-oe/recipes-support/emacs/emacs_29.1.bb | 1 + ...w.el-mm-display-inline-fontify-Mark-.patch | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 meta-oe/recipes-support/emacs/files/0001-lisp-gnus-mm-view.el-mm-display-inline-fontify-Mark-.patch diff --git a/meta-oe/recipes-support/emacs/emacs_29.1.bb b/meta-oe/recipes-support/emacs/emacs_29.1.bb index 3701e17025..c5318db96e 100644 --- a/meta-oe/recipes-support/emacs/emacs_29.1.bb +++ b/meta-oe/recipes-support/emacs/emacs_29.1.bb @@ -10,6 +10,7 @@ SRC_URI:append:class-target = " \ file://use-emacs-native-tools-for-cross-compiling.patch \ file://avoid-running-host-binaries-for-sanity.patch \ file://0001-org-macro-set-templates-Prevent-code-evaluation.patch \ + file://0001-lisp-gnus-mm-view.el-mm-display-inline-fontify-Mark-.patch \ " SRC_URI[sha256sum] = "d2f881a5cc231e2f5a03e86f4584b0438f83edd7598a09d24a21bd8d003e2e01" diff --git a/meta-oe/recipes-support/emacs/files/0001-lisp-gnus-mm-view.el-mm-display-inline-fontify-Mark-.patch b/meta-oe/recipes-support/emacs/files/0001-lisp-gnus-mm-view.el-mm-display-inline-fontify-Mark-.patch new file mode 100644 index 0000000000..d951bf4205 --- /dev/null +++ b/meta-oe/recipes-support/emacs/files/0001-lisp-gnus-mm-view.el-mm-display-inline-fontify-Mark-.patch @@ -0,0 +1,27 @@ +From 0e7fe7809daa123921faa0bd088931cf8ddfd705 Mon Sep 17 00:00:00 2001 +From: Ihor Radchenko +Date: Tue, 20 Feb 2024 12:44:30 +0300 +Subject: [PATCH] * lisp/gnus/mm-view.el (mm-display-inline-fontify): Mark + contents untrusted. + +CVE: CVE-2024-30203 + +Upstream-Status: Backport [https://cgit.git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-29&id=937b9042ad7426acdcca33e3d931d8f495bdd804] + +Signed-off-by: Gyorgy Sarvari +--- + lisp/gnus/mm-view.el | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el +index 2c40735..e24f3f3 100644 +--- a/lisp/gnus/mm-view.el ++++ b/lisp/gnus/mm-view.el +@@ -504,6 +504,7 @@ If MODE is not set, try to find mode automatically." + (setq coding-system (mm-find-buffer-file-coding-system))) + (setq text (buffer-string)))) + (with-temp-buffer ++ (setq untrusted-content t) + (insert (cond ((eq charset 'gnus-decoded) + (with-current-buffer (mm-handle-buffer handle) + (buffer-string))) From patchwork Mon Oct 6 12:11:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gyorgy Sarvari X-Patchwork-Id: 71700 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C541DCCD184 for ; Mon, 6 Oct 2025 12:11:28 +0000 (UTC) Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) by mx.groups.io with SMTP id smtpd.web10.32348.1759752685196381677 for ; Mon, 06 Oct 2025 05:11:25 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ep5FKCpd; spf=pass (domain: gmail.com, ip: 209.85.218.52, mailfrom: skandigraun@gmail.com) Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-b3b27b50090so889676466b.0 for ; Mon, 06 Oct 2025 05:11:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759752683; x=1760357483; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=QYZVxGlTl0+DSff4UNw9iceKwlDH97VKpf3mwiOA6a0=; b=ep5FKCpd9rkCm4GqUCI7rR4O5pOoEwG+82nGCidVHLWCBKnb5nhl06xOhTotbhm90l YtjH+IuHHgYi5m5wcfSGU/NqzPkbdpm9JPu1eCrozKqQbNF1J85wj+6IOa6/GYKpv55n utnHqXphTOoAGcnoSlijTo8CQndvHCbwe2qdiNEjctcvsVlrRWJAcH7TshOKrfjkSewM okB7zXUhqxjXps5bHKZGsZuBHFBATrt7XWLv5650TTxbPbqjXINt8iKSiYoTN+FwoTVb aWIWjxwwarS2yKaTxTvwz6VT28/ayY07SD+MfSh8QBKHRI9ByyZzOjoCJlwEwWFyiQnU zTDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759752683; x=1760357483; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QYZVxGlTl0+DSff4UNw9iceKwlDH97VKpf3mwiOA6a0=; b=Dcb5vAjy7EeNgzLtBIFI8j8D3m0U62kCEuTVfF3tXw3D9uXQNitqYnoBBvnBgJBGws YwK10mWxZDpl8/f1l2Fq5fac4pdsE+dEq+RIIWvcw6yWe4VgE+xhIq0BL2YGXtZ07BT5 qWuz6VKxNRqJBPsViUs6q9zgpSXRLHAcrcmvhoh4ZgRy1vYR8OgtSIbVWIBL9THQjC1r pA/OTOOFl8AWLPXOyL+nkfLGNyDglvzWcCeN9z1bfQHbvGFCgTFbkfFulCvq7MI3p+B3 y8XkYuKEPVYFwOT+WuOFt5hsIoiAL8C62J3bS+8MC0o87oVD4HuKljiDvb3b9wWc5+zy LA3w== X-Gm-Message-State: AOJu0Yx8b4PC5bEcYnuxEa6LFcn0nFrCiQZ0KD6GdbRCJXpL8lWUj0p1 AXBjHEgOYdqCQl9oBUcZEpGChqKWN/QmabJ10ZjtW2vajNKhdNLjTMn+DvyJfw== X-Gm-Gg: ASbGnctHx6xs+ZK1d/OcIOzCmSMxKXfTj9xGz12xMeZMco0lgxhKz/BpwpIdpXYIydQ Yo+QBAFHnGfIC3C13/mGPRrTUUaRYGpCk8XcvsyvLPLZxxPBncJ3zfvD20wHierPD4cns0y+wXu hdSqkJ+LtZx59lDQhfDoiRHcc8qqZR366UhXlpSPfku0EK9XOkPQ+ahrbY8c/F6/pMeB+zJpjaj icmiKJwQ5ohNCK0jZzO0azF2xKxW6BRz6xb7L59Z99SXAq/qiiLsHbLhfF9xZiHS1uKkn/t9uAg yI5e4LQiqtufXYjA0z1K+xIs9KAJFhbbKnFlJnJlzGCjvFmoWl6xG2WFdNNRuUt6ivVkEqdukYu RJ06THHdSRk5FSH/9v8NB5NK7sgnKkLV9S13uAssEAtmtjqfdL5e3bZ4= X-Google-Smtp-Source: AGHT+IEUzonsba6f/bIERCQ/UmVaRy26giurwzazZTJGuDSBeqGMfGFqH6II/Acxw5N8DsD2BmoIcA== X-Received: by 2002:a17:907:da6:b0:b3e:d492:d7b8 with SMTP id a640c23a62f3a-b49c45addbfmr1543593266b.64.1759752683367; Mon, 06 Oct 2025 05:11:23 -0700 (PDT) Received: from desktop ([51.154.145.205]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b4869c4fd9esm1134367966b.76.2025.10.06.05.11.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Oct 2025 05:11:22 -0700 (PDT) From: Gyorgy Sarvari To: openembedded-devel@lists.openembedded.org Subject: [meta-oe][scarthgap][PATCH 3/5] emacs: patch CVE-2024-30204 Date: Mon, 6 Oct 2025 14:11:18 +0200 Message-ID: <20251006121120.533142-3-skandigraun@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251006121120.533142-1-skandigraun@gmail.com> References: <20251006121120.533142-1-skandigraun@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 06 Oct 2025 12:11:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/120287 Details: https://nvd.nist.gov/vuln/detail/CVE-2024-30204 Pick the patch that's mentioned in the description. Signed-off-by: Gyorgy Sarvari --- meta-oe/recipes-support/emacs/emacs_29.1.bb | 1 + ...w-Add-protection-when-untrusted-cont.patch | 60 +++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 meta-oe/recipes-support/emacs/files/0001-org-latex-preview-Add-protection-when-untrusted-cont.patch diff --git a/meta-oe/recipes-support/emacs/emacs_29.1.bb b/meta-oe/recipes-support/emacs/emacs_29.1.bb index c5318db96e..c4ae7be6d8 100644 --- a/meta-oe/recipes-support/emacs/emacs_29.1.bb +++ b/meta-oe/recipes-support/emacs/emacs_29.1.bb @@ -11,6 +11,7 @@ SRC_URI:append:class-target = " \ file://avoid-running-host-binaries-for-sanity.patch \ file://0001-org-macro-set-templates-Prevent-code-evaluation.patch \ file://0001-lisp-gnus-mm-view.el-mm-display-inline-fontify-Mark-.patch \ + file://0001-org-latex-preview-Add-protection-when-untrusted-cont.patch \ " SRC_URI[sha256sum] = "d2f881a5cc231e2f5a03e86f4584b0438f83edd7598a09d24a21bd8d003e2e01" diff --git a/meta-oe/recipes-support/emacs/files/0001-org-latex-preview-Add-protection-when-untrusted-cont.patch b/meta-oe/recipes-support/emacs/files/0001-org-latex-preview-Add-protection-when-untrusted-cont.patch new file mode 100644 index 0000000000..085bc31c17 --- /dev/null +++ b/meta-oe/recipes-support/emacs/files/0001-org-latex-preview-Add-protection-when-untrusted-cont.patch @@ -0,0 +1,60 @@ +From c5cc03c196306372e53700553e0fb5135f6105e6 Mon Sep 17 00:00:00 2001 +From: Ihor Radchenko +Date: Tue, 20 Feb 2024 12:47:24 +0300 +Subject: [PATCH] org-latex-preview: Add protection when `untrusted-content' is + non-nil + +* lisp/org/org.el (org--latex-preview-when-risky): New variable +controlling how to handle LaTeX previews in Org files from untrusted +origin. +(org-latex-preview): Consult `org--latex-preview-when-risky' before +generating previews. + +This patch adds a layer of protection when LaTeX preview is requested +for an email attachment, where `untrusted-content' is set to non-nil. + +CVE: CVE-2024-30204 + +Upstream-Status: Backport [https://cgit.git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-29&id=6f9ea396f49cbe38c2173e0a72ba6af3e03b271c] +Signed-off-by: Gyorgy Sarvari +--- + lisp/org/org.el | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +diff --git a/lisp/org/org.el b/lisp/org/org.el +index d3e14fe..ab58978 100644 +--- a/lisp/org/org.el ++++ b/lisp/org/org.el +@@ -1140,6 +1140,24 @@ the following lines anywhere in the buffer: + :package-version '(Org . "8.0") + :type 'boolean) + ++(defvar untrusted-content) ; defined in files.el ++(defvar org--latex-preview-when-risky nil ++ "If non-nil, enable LaTeX preview in Org buffers from unsafe source. ++ ++Some specially designed LaTeX code may generate huge pdf or log files ++that may exhaust disk space. ++ ++This variable controls how to handle LaTeX preview when rendering LaTeX ++fragments that originate from incoming email messages. It has no effect ++when Org mode is unable to determine the origin of the Org buffer. ++ ++An Org buffer is considered to be from unsafe source when the ++variable `untrusted-content' has a non-nil value in the buffer. ++ ++If this variable is non-nil, LaTeX previews are rendered unconditionally. ++ ++This variable may be renamed or changed in the future.") ++ + (defcustom org-insert-mode-line-in-empty-file nil + "Non-nil means insert the first line setting Org mode in empty files. + When the function `org-mode' is called interactively in an empty file, this +@@ -15687,6 +15705,7 @@ fragments in the buffer." + (interactive "P") + (cond + ((not (display-graphic-p)) nil) ++ ((and untrusted-content (not org--latex-preview-when-risky)) nil) + ;; Clear whole buffer. + ((equal arg '(64)) + (org-clear-latex-preview (point-min) (point-max)) From patchwork Mon Oct 6 12:11:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gyorgy Sarvari X-Patchwork-Id: 71701 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF167CAC5B8 for ; Mon, 6 Oct 2025 12:11:28 +0000 (UTC) Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) by mx.groups.io with SMTP id smtpd.web10.32349.1759752685897001809 for ; Mon, 06 Oct 2025 05:11:26 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=SZyk3z06; spf=pass (domain: gmail.com, ip: 209.85.218.43, mailfrom: skandigraun@gmail.com) Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-b3e7cc84b82so855150266b.0 for ; Mon, 06 Oct 2025 05:11:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759752684; x=1760357484; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=u48Y38JTCtbqBUijPbBEtWv8/S4cp7Nx8P9jYozjMks=; b=SZyk3z06lolio//Z+S5VE5y2js9ZdUBTX3fwSGazG1ZOCI9WFTCcf5p+kcQkjq2L2l a49vYZHiqMY2rb5dSJGBeck7XIV/+cipXkd0b7JwG78WOZIYHP66p0iKayMB+Q9oUYLL JUJzjESYN0oBWLkkIroi6FcsesurFqQMPNbBQEIM/Y8j2XCQmGibetH/A47ZSxrOZufS 8/rgCbZo80V74ZZln3w616UkSD8qHIH1ZSkdE4RY/lstv9tUldQWqBGGRgd7ymYOyTqG 7jcF8nkMw4DkxrKao5aTWSNJ2/qKvX02s5ln/DXsYjCJ9y6BPMSVEIkSv9cOEOrWKM9J 638Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759752684; x=1760357484; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=u48Y38JTCtbqBUijPbBEtWv8/S4cp7Nx8P9jYozjMks=; b=h+ZEafsSazXqykkHib09ncdtRpbMN5TYkFMgd71zuqiBDWFRF3iMRXLV/yCD4cqM/9 LMWkwkhJdNVkIsm9ox8x49BZRDEFxW8qWhjyA2ghCrD1AG/MQgEt78f3C3nxX+ClwGjE GftIHiA/K0H3ZY/3GG0o/DH6LiHka5CXrskb8oeGpr8VBM+stwpWc/bHIIvNCl/gKCes GbeidFK4yv4FjwHCKTUSJ4zqXT7kHM0LyW1Sr30CxTsLYvUzX3DqzK/f/p/N/0C6P5GY 0y6544wkhMkSPFoQEUA8u3GQglsdWz8CIcQIVxYbyn+YnltfSNP1sCVi1l0ODnwm/Jnk Lokw== X-Gm-Message-State: AOJu0YxlmphcwQa6j6xHlPbRmGaV5trpUwG4lFriReslsdbsbh6JgZ5/ oGDvBoOF3r9XS5+Mvaq8fEQHsXcFQ1qOzuI3Ob5WTkWFUfEPigp7K2RYFRDeMQ== X-Gm-Gg: ASbGncsF7yiZ+WLPLhUvjw9afoqfvucNafku9lZFC20+W+YISeIiZHelKdR5V8EuyzL XN+csR2Zl+ockE8vL7r5fpRl+pJZett6bqBOFgzeQzbh2yw1Qs6dML4illnf6jpEjD3VgVFZgR1 Baf9epoayRGCj41klZMtDJr1HfW7jsQA1FvchsIdc4pYZLN5iysZayq/m0PVCoJ711dZqhSgcEU uX6Q+W0K35ULU3yQI7r0ocbOT2DG6MQqMBROLnp2bQqzNALxYMtHGmtku4rToA0FLzK7QUbi/PF Jn+vJod04HfEK9Kuk4OJH2rYyRSGs3wYQqi5By/gQzpitbEEAHivwUR45jboywZBf8pmIpyIOmP h4c1BFyQaiiNfFYThONVQa3WgqwriLP/Xu2yKdZZPwDWmeHJBX4K+S0o= X-Google-Smtp-Source: AGHT+IG+qlKecHaaSXpxAmYTaPcDDcLYWsbsUX9RdmwpGQhkqoxPliUZ/PnK3Bl4/DRsYWpFGWJxug== X-Received: by 2002:a17:907:a4c:b0:b3f:1028:a86a with SMTP id a640c23a62f3a-b49c157e0b2mr1561394666b.3.1759752684081; Mon, 06 Oct 2025 05:11:24 -0700 (PDT) Received: from desktop ([51.154.145.205]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b4869c4fd9esm1134367966b.76.2025.10.06.05.11.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Oct 2025 05:11:23 -0700 (PDT) From: Gyorgy Sarvari To: openembedded-devel@lists.openembedded.org Subject: [meta-oe][scarthgap][PATCH 4/5] emacs: patch CVE-2024-30205 Date: Mon, 6 Oct 2025 14:11:19 +0200 Message-ID: <20251006121120.533142-4-skandigraun@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251006121120.533142-1-skandigraun@gmail.com> References: <20251006121120.533142-1-skandigraun@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 06 Oct 2025 12:11:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/120288 Details: https://nvd.nist.gov/vuln/detail/CVE-2024-30205 Pick the patch that's in the description. Signed-off-by: Gyorgy Sarvari --- meta-oe/recipes-support/emacs/emacs_29.1.bb | 1 + ...nts-Consider-all-remote-files-unsafe.patch | 38 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 meta-oe/recipes-support/emacs/files/0001-org-file-contents-Consider-all-remote-files-unsafe.patch diff --git a/meta-oe/recipes-support/emacs/emacs_29.1.bb b/meta-oe/recipes-support/emacs/emacs_29.1.bb index c4ae7be6d8..704a8210a1 100644 --- a/meta-oe/recipes-support/emacs/emacs_29.1.bb +++ b/meta-oe/recipes-support/emacs/emacs_29.1.bb @@ -12,6 +12,7 @@ SRC_URI:append:class-target = " \ file://0001-org-macro-set-templates-Prevent-code-evaluation.patch \ file://0001-lisp-gnus-mm-view.el-mm-display-inline-fontify-Mark-.patch \ file://0001-org-latex-preview-Add-protection-when-untrusted-cont.patch \ + file://0001-org-file-contents-Consider-all-remote-files-unsafe.patch \ " SRC_URI[sha256sum] = "d2f881a5cc231e2f5a03e86f4584b0438f83edd7598a09d24a21bd8d003e2e01" diff --git a/meta-oe/recipes-support/emacs/files/0001-org-file-contents-Consider-all-remote-files-unsafe.patch b/meta-oe/recipes-support/emacs/files/0001-org-file-contents-Consider-all-remote-files-unsafe.patch new file mode 100644 index 0000000000..7408f0e404 --- /dev/null +++ b/meta-oe/recipes-support/emacs/files/0001-org-file-contents-Consider-all-remote-files-unsafe.patch @@ -0,0 +1,38 @@ +From 3a3bc6df4295ff7d5ea7193dfe0492cd858e1664 Mon Sep 17 00:00:00 2001 +From: Ihor Radchenko +Date: Tue, 20 Feb 2024 14:59:20 +0300 +Subject: [PATCH] org-file-contents: Consider all remote files unsafe + +* lisp/org/org.el (org-file-contents): When loading files, consider all +remote files (like TRAMP-fetched files) unsafe, in addition to URLs. + +CVE: CVE-2024-30205 +Upstream-Status: Backport [https://cgit.git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-29&id=2bc865ace050ff118db43f01457f95f95112b877] + +Signed-off-by: Gyorgy Sarvari +--- + lisp/org/org.el | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/lisp/org/org.el b/lisp/org/org.el +index ab58978..03140bd 100644 +--- a/lisp/org/org.el ++++ b/lisp/org/org.el +@@ -4576,12 +4576,16 @@ from file or URL, and return nil. + If NOCACHE is non-nil, do a fresh fetch of FILE even if cached version + is available. This option applies only if FILE is a URL." + (let* ((is-url (org-url-p file)) ++ (is-remote (condition-case nil ++ (file-remote-p file) ++ ;; In case of error, be safe. ++ (t t))) + (cache (and is-url + (not nocache) + (gethash file org--file-cache)))) + (cond + (cache) +- (is-url ++ ((or is-url is-remote) + (if (org--should-fetch-remote-resource-p file) + (condition-case error + (with-current-buffer (url-retrieve-synchronously file)