Bug 2585482 - CVE-2026-137728 tnef: Tnef <= 1.4.18 Heap OOB Read with Single-Character --body-pref [fedora-all]
Summary: CVE-2026-137728 tnef: Tnef <= 1.4.18 Heap OOB Read with Single-Character --bo...
Keywords:
Status: ON_QA
Alias: None
Product: Fedora
Classification: Fedora
Component: tnef
Version: rawhide
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
Assignee: Artur Frenszek-Iwicki
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: {"flaws": ["6e12d709-4a93-4eea-8867-e...
Depends On:
Blocks: CVE-2026-137728
TreeView+ depends on / blocked
 
Reported: 2026-11-27 14:44 UTC by gkamathe
Modified: 2026-11-28 04:21 UTC (History)
2 users (show)

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


Attachments (Terms of Use)

Description gkamathe 2026-11-27 14:44:50 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.

parse_file() indexes a single-character --body-pref string as though it always contained three preference characters. If the TNEF file has no matching message body, this reaches a one-byte heap out-of-bounds read.
Root-Cause Analysis

src/main.c:109-115 accepts a one-character preference and duplicates it into an exact-sized two-byte allocation:
if (strlen(optarg) == 0 || strlen(optarg) > 3) { /* reject */ }
pref = strdup(optarg);

src/tnef.c:365-368 then unconditionally indexes positions 0, 1, and 2:
for (; i < 3; i++)
{
    File **files = get_body_files(body_filename, body_pref[i], &body);

For "r", indices 0 and 1 are the character and NUL; index 2 is one byte past the allocation. The loop reaches index 2 when get_body_files finds no matching body and therefore does not break. For "rh", index 2 is the allocated NUL byte, so no out-of-bounds read occurs.
Steps to Reproduce

    Build TNEF with AddressSanitizer:

autoreconf -fi
CC=clang CFLAGS="-O1 -g -fsanitize=address -fno-omit-frame-pointer" LDFLAGS="-fsanitize=address" ./configure
make

    Use the POC script to generate a TNEF to reproduce this issue: poc_body_pref_overread.py:

python3 poc_body_pref_overread.py

    Run using:

tnef --save-body --body-pref=r poc-body-pref-overread.tnef

    Observe AddressSanitizer reporting a heap-buffer-overflow with READ of size 1.

Comment 1 Fedora Update System 2026-11-27 20:23:26 UTC
FEDORA-2026-479c3c18e2 (tnef-1.5.0-1.fc45) has been submitted as an update to Fedora 45.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-479c3c18e2

Comment 2 Fedora Update System 2026-11-27 20:33:54 UTC
FEDORA-2026-ebd2692f11 (tnef-1.5.0-1.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-ebd2692f11

Comment 3 Fedora Update System 2026-11-28 04:01:27 UTC
FEDORA-2026-479c3c18e2 has been pushed to the Fedora 45 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-479c3c18e2`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-479c3c18e2

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Fedora Update System 2026-11-28 04:21:45 UTC
FEDORA-2026-ebd2692f11 has been pushed to the Fedora 44 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-ebd2692f11`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-ebd2692f11

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.


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