Bug 2574261 (CVE-2026-130498)

Summary: CVE-2026-130498 tnef: tnef: Unbounded memory allocation and reachable assert via crafted MAPI property value count
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: 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 processing a crafted attachment, tnef can be made to request an excessively large amount of memory, with the size controlled by the attacker. This can crash the application, or cause it to be killed due to memory exhaustion in memory-limited deployments such as containerized mail gateways and antivirus scanners. An attacker who can send crafted email attachments to a system that decodes them with tnef can repeatedly disrupt the decoding process, resulting in a denial of service.
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: 2574268    
Bug Blocks:    

Description OSIDB Bzimport 2026-11-17 09:42:48 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 on tnef-1.4.18-17.fc44 and on a build of the upstream 1.4.12 tag.

In mapi_attr_read() (src/mapi_attr.c), the MAPI property value count num_values is read from the TNEF input with only a 4-byte readability check (CHECKINT32, util.h) and is used as the element count of CHECKED_XCALLOC(MAPI_Value, num_values) in alloc_mapi_values(). No bound ties the count to the attribute buffer length, and alloc_limit defaults to 0 (set only by the non-default --maxsize/-x option). A 37-byte crafted TNEF file with num_values=0x20000000 drives a 12,884,905,984-byte allocation request (0x20000000 * sizeof(MAPI_Value)=24, plus allocator header, page-aligned).

Observed impact: allocation failure (ulimit -v, overcommit_memory=2, capped address space) aborts via assert(v) at mapi_attr.c:255 (SIGABRT, exit 134); num_values=0 triggers the same assert deterministically with no allocation at all (alloc_mapi_values returns NULL for a zero count - reachable assert, CWE-617) with no environmental prerequisite; when the allocation succeeds, xcalloc's memset touches the entire region (measured: 1,574,484 KB max RSS for a 1.5 GiB request on the Fedora RPM build), so memory-capped deployments are OOM-killed; on tnef 1.4.12 (no assert, unguarded value loop) allocation failure is a NULL-pointer write at mapi_attr.c:308 (SIGSEGV, gdb-confirmed from coredump) and a successful allocation leads to an out-of-bounds crash at mapi_attr.c:317; on 32-bit builds the count*size multiplication overflows size_t and check_mul_overflow aborts immediately.

The num_properties field at the same site is an unbounded twin. Present in the 1.4.18 tag and at upstream HEAD 8b43e8b (2026-11-03); not fixed upstream. tnef is not shipped in RHEL; exposure is the Fedora/community stream.