Skip to content

Apply modified Debian 05-gniibe-fix-13.patch#15

Merged
pepone merged 1 commit intozeroc-ice:masterfrom
pepone:fix-issue-9-cve-2019-14274
Jan 19, 2026
Merged

Apply modified Debian 05-gniibe-fix-13.patch#15
pepone merged 1 commit intozeroc-ice:masterfrom
pepone:fix-issue-9-cve-2019-14274

Conversation

@pepone
Copy link
Copy Markdown
Member

@pepone pepone commented Jan 19, 2026

to fix heap-based buffer overflow in the do_msg() function

https://sourceforge.net/p/mcpp/bugs/13/ and CVE-2019-14274

Description: Fix for a bug reported to sourceforge.net #13
by fixing error messages.
Also, fix erroneous messages.
Author: NIIBE Yutaka

The buffer overflow was caused by do_msg() treating illegal control characters in the error message output as tokenized macros that needed to be expanded for printing.

This fixes the problem by just not printing the preprocessed source code which contains those illegal control characters.

The patch has been reworked to change the error messages to better match those that are output when unterminated strings are encountered. It also changes the other patched messages to restore the 'l' in "%02lx" because do_msg() passes a long integer to mcpp_fprintf().

…r overflow in the do_msg() function

https://sourceforge.net/p/mcpp/bugs/13/ and CVE-2019-14274

Description: Fix for a bug reported to sourceforge.net zeroc-ice#13
   by fixing error messages.
   Also, fix erroneous messages.
Author: NIIBE Yutaka

The buffer overflow was caused by do_msg() treating illegal control characters
in the error message output as tokenized macros that needed to be expanded for
printing.

This fixes the problem by just not printing the preprocessed source code which
contains those illegal control characters.

The patch has been reworked to change the error messages to better match those
that are output when unterminated strings are encountered. It also changes the
other patched messages to restore the 'l' in "%02lx" because do_msg() passes a
long integer to mcpp_fprintf().
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR applies a modified Debian patch to fix CVE-2019-14274, a heap-based buffer overflow vulnerability in the do_msg() function. The vulnerability was caused by do_msg() treating illegal control characters in error messages as tokenized macros that needed expansion, leading to potential buffer overflows.

Changes:

  • Modified error message format strings to fix typos and improve consistency
  • Changed error calls to pass safe constant strings instead of potentially dangerous buffer contents
  • Ensured format specifiers correctly match the long integer arguments being passed

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pepone pepone merged commit 0264ec0 into zeroc-ice:master Jan 19, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants