Bug 1442099 - (CVE-2017-7467) CVE-2017-7467 minicom: Out of bounds write in vt100.c
CVE-2017-7467 minicom: Out of bounds write in vt100.c
Status: CLOSED WONTFIX
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
impact=moderate,public=20170418,repor...
: Security
Depends On: 1443129
Blocks: 1442106
  Show dependency treegraph
 
Reported: 2017-04-13 09:55 EDT by Adam Mariš
Modified: 2018-07-10 23:31 EDT (History)
5 users (show)

See Also:
Fixed In Version: minicom 2.7.1
Doc Type: If docs needed, set a value
Doc Text:
A buffer overflow flaw was found in the way minicom handled VT100 escape sequences. A malicious terminal device could potentially use this flaw to crash minicom, or execute arbitrary code in the context of the minicom process.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-04-20 00:42:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Adam Mariš 2017-04-13 09:55:51 EDT
A potentially exploitable out of bounds write vulnerability in vt100.c was found.

Vulnerable code:

static void (*vt_keyb)(int, int);/* Gets called for NORMAL/APPL switch. */
static void (*termout)(const char *, int);/* Gets called to output a string. */

static int escparms[8];         /* Cumulated escape sequence. */
static int ptr;                 /* Index into escparms array. */
static long vt_tabs[5];         /* Tab stops for max. 32*5 = 160 columns. */

//...

  /* See if a number follows */
  if (c >= '0' && c <= '9') {
    escparms[ptr] = 10*escparms[ptr] + c - '0';
    return;
  }
  /* Separation between numbers ? */
  if (c == ';') {
    if (ptr < 15)
      ptr++;
    return;
  }

With crafted input, attacker can write out of bounds of escparms array and could potentially overwrite ptr pointer.
Comment 1 Adam Mariš 2017-04-13 09:55:55 EDT
Acknowledgments:

Name: Alexander Peslyak (Openwall)
Comment 5 Dhiru Kholia 2017-04-18 10:12:59 EDT
Created minicom tracking bugs for this issue:

Affects: fedora-all [bug 1443129]
Comment 6 Dhiru Kholia 2017-04-18 10:17:49 EDT
Public via http://www.openwall.com/lists/oss-security/2017/04/18/5

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