Bug 2574268

Summary: CVE-2026-130498 tnef: tnef: Unbounded memory allocation and reachable assert via crafted MAPI property value count [fedora-all]
Product: [Fedora] Fedora Reporter: Thibault Guittet <tguittet>
Component: tnefAssignee: Artur Frenszek-Iwicki <fedora>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: dtimms, fedora
Target Milestone: ---Keywords: Security, SecurityTracking
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: {"flaws": ["5c38e7f5-5e73-441c-a589-35594fea91b0"]}
Fixed In Version: Doc Type: ---
Doc Text:
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:    
Bug Blocks: 2574261    

Description Thibault Guittet 2026-11-17 10:22:46 UTC
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.

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.