REDHAT-BUG-2506145: Buffer Overflow

Published Jul 22, 2026
·
Updated

diff3 tool from GNU diffutils is vulnerable to a heap‑based buffer overflow due to multiple signed integer overflows in line‑mapping calculations. Incorrect arithmetic in mapping line ranges can result in corrupted values being used for memory allocation and loop bounds. When processing crafted diff output, these overflows may cause the application to allocate insufficient memory and subsequently perform out‑of‑bounds writes during internal processing. An attacker who can control the output of the diff program used by diff3 (e.g. via --diff-program pointing to a malicious script) can trigger out-of-bounds writes, resulting in a crash and potentially remote code execution depending on the environment.

This issue has been fixed in commit 9ff04d5b84743e331e80b589335a52c5480d1815

Affected Software

1 affected component
GNU diffutils

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch 9ff04d5b84743e331e80b589335a52c5480d1815

Event History

Jul 22, 2026
Data Sourced
via Red Hat·02:02 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What access does an attacker need to trigger this issue?

The attacker needs to control the output of the diff program that diff3 uses. One stated example is use of the --diff-program option to point diff3 at a malicious script.

2

Are normal diff3 invocations exposed?

The described attack path depends on a crafted diff-program output rather than ordinary input alone. Exposure is therefore most relevant where users, automation, or other processes can select or influence the diff program used by diff3.

3

What is the likely impact of successful exploitation?

The integer overflows can cause insufficient allocation followed by out-of-bounds writes, which can crash diff3. The issue may also permit remote code execution depending on the environment.

4

How can I determine whether my source includes the fix?

The issue is fixed by commit 9ff04d5b84743e331e80b589335a52c5480d1815. Check the source or package changelog for inclusion of that commit or its corresponding downstream fix.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203