Bug 2574260 (CVE-2026-130499) - CVE-2026-130499 tnef: tnef: Heap out-of-bounds read via non-NUL-terminated MAPI MIME tag and content ID values
Summary: CVE-2026-130499 tnef: tnef: Heap out-of-bounds read via non-NUL-terminated MA...
Keywords:
Status: NEW
Alias: CVE-2026-130499
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2574269
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-11-17 09:42 UTC by OSIDB Bzimport
Modified: 2026-11-17 10:22 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2026-11-17 09:42:34 UTC
Privately reported via the Product Security support portal (reported 2026-11-09; reporter requested coordinated disclosure, nothing public as of creation). Independently confirmed by Red Hat with valgrind on tnef-1.4.18-17.fc44, on both code paths.

file_add_mapi_attrs() (src/file.c) copies the PR_ATTACH_MIME_TAG (0x370E) and PR_ATTACH_CONTENT_ID (0x3712) MAPI values into heap buffers sized exactly to the value length (CHECKED_XMALLOC(char, len) plus memmove of len bytes), dropping the NUL terminator that mapi_attr.c's CHECKED_XMALLOC_ADDNULL added to the parsed value. file_write() then prints the buffers with fprintf("%s") (file.c:154/155) whenever MIME listing is enabled - g_flags & LISTMIME, set by -v or --list-with-mime-types (-t alone does not print MIME columns).

The %s read runs past the end of the allocation until the next NUL byte on the heap: a heap out-of-bounds read (CWE-125) that discloses adjacent heap bytes in the listing output (which typically lands in gateway/scanner logs) and can crash the process on an unfavorable heap layout. On glibc a 7-byte request gets 24 usable bytes, so the read usually stops in zeroed chunk slack; a fault requires roughly 17+ consecutive non-NUL bytes and an unmapped boundary.

Valgrind evidence (stock Fedora binary, independently constructed 106/107-byte inputs): Invalid read of size 1 in strlen under fprintf at file_write (file.c:154 for MIME_TAG, file.c:155 for CONTENT_ID), 0 bytes after a 7-byte block allocated in file_add_mapi_attrs (file.c:192/199). Present in the 1.4.18 tag and at upstream HEAD; not fixed upstream. tnef is not shipped in RHEL; exposure is the Fedora/community stream.


Note You need to log in before you can comment on or make changes to this bug.