Bug 2574260 (CVE-2026-130499)
| Summary: | CVE-2026-130499 tnef: tnef: Heap out-of-bounds read via non-NUL-terminated MAPI MIME tag and content ID values | ||
|---|---|---|---|
| Product: | [Other] Security Response | Reporter: | OSIDB Bzimport <bzimport> |
| Component: | vulnerability | Assignee: | Product Security <prodsec-ir-bot> |
| Status: | NEW --- | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | unspecified | CC: | security-response-team |
| Target Milestone: | --- | Keywords: | Security |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | --- | |
| Doc Text: |
A flaw was found in tnef, a tool that decodes TNEF (winmail.dat) email attachments. When tnef processes a crafted attachment and prints attachment details, such as MIME types, it can read past the end of an internal buffer. This can disclose small amounts of memory contents in the application output or cause the application to crash.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | --- | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 2574269 | ||
| Bug Blocks: | |||
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.