GNU Emacs 30.1 发布带 2 个 CVE 修复
Emacs文件局部变量存在安全隐患,攻击者可利用自定义Lisp函数执行恶意代码。专家建议禁用自动补全和本地评估以缓解风险,但可能影响用户体验。 2025-3-1 16:51:0 Author: seclists.org(查看原文) 阅读量:6 收藏

oss-sec logo

oss-sec mailing list archives


From: Henrik Ahlgren <pablo () seestieto com>
Date: Sat, 01 Mar 2025 14:39:06 +0200

Max Nikulin <manikulin () gmail com> writes:

- Disable auto-completion features in untrusted .el files
- UPDATE: Also set enable-local-eval to nil

It should work, however it is rather drastic measure that may cause
inconvenience.

I wanted to point out an interesting aspect of Emacs file local
variables. It may be surprising to some that including `-*-
eval:(foobar-mode) -*-` at the beginning of a file will happily evaluate
the specified function, regardless of whether it is an "actual" minor
mode created with `define-minor-mode'. The only requirement is that the
name ends with "-mode."

This raises some questions about potential security implications. While
I'm not certain how relevant this is or in what scenarios it could be
exploited (if an attacker can define a new function, it's obviously
game-over no matter what), it certainly feels concerning. Some users may
expect the `-mode` convention to apply solely to well-known, built-in
minor modes in Emacs, not for instance the user's own custom Lisp.


Current thread:


文章来源: https://seclists.org/oss-sec/2025/q1/167
如有侵权请联系:admin#unsafe.sh