[Midnightbsd-cvs] [MidnightBSD/mports] 3f4ac7: editors/emacs: fix CVE-2026-6861 (SVG stylesheet h...

Lucas Holt noreply at github.com
Fri Aug 21 19:25:42 EDT 2026


  Branch: refs/heads/editors/emacs
  Home:   https://github.com/MidnightBSD/mports
  Commit: 3f4ac782e4d1a3c58ede59d71ad987837f5f1ae5
      https://github.com/MidnightBSD/mports/commit/3f4ac782e4d1a3c58ede59d71ad987837f5f1ae5
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-08-21 (Fri, 21 Aug 2026)

  Changed paths:
    M editors/emacs/Makefile
    A editors/emacs/files/patch-src_image.c

  Log Message:
  -----------
  editors/emacs: fix CVE-2026-6861 (SVG stylesheet heap overflow)

svg_load_image() in src/image.c wrote its NUL terminator one byte past
the end of the buffer allocated for an SVG's inline stylesheet data:

    css = xmalloc (SBYTES (lcss) + 1);
    strncpy (css, SSDATA (lcss), SBYTES (lcss));
    *(css + SBYTES (lcss) + 1) = 0;

Opening a crafted SVG file therefore corrupts the heap, which can crash
Emacs or disclose adjacent memory. Affects 28.1 through 30.2; there is
no fixed stable release upstream, so carry the fix as a port patch.

Only reachable when built with SVG support (librsvg), which is on by
default via OPTIONS_DEFAULT.

Verified the unpatched line is present in the 30.2 distfile, that the
patch applies cleanly, and that src/image.c compiles and links with
SVG support enabled.

Upstream bug:	https://debbugs.gnu.org/cgi/bugreport.cgi?bug=80851
Obtained from:	FreeBSD ports 915d199e510d
Security:	CVE-2026-6861

AI-Assisted-by: Claude Opus 5 <noreply at anthropic.com>
Signed-off-by: Lucas Holt <luke at foolishgames.com>



To unsubscribe from these emails, change your notification settings at https://github.com/MidnightBSD/mports/settings/notifications


More information about the Midnightbsd-cvs mailing list