Bug 2006978 (CVE-2021-39537) - CVE-2021-39537 ncurses: heap-based buffer overflow in _nc_captoinfo() in captoinfo.c
Summary: CVE-2021-39537 ncurses: heap-based buffer overflow in _nc_captoinfo() in capt...
Keywords:
Status: NEW
Alias: CVE-2021-39537
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2007637 2007638 2007372 2007373 2007374 2007620 2007633
Blocks: 2006979
TreeView+ depends on / blocked
 
Reported: 2021-09-22 18:47 UTC by Guilherme de Almeida Suckevicz
Modified: 2021-11-16 14:30 UTC (History)
12 users (show)

Fixed In Version: ncurses 6.2.2
Doc Type: If docs needed, set a value
Doc Text:
The ncurses package (tic) is susceptible to a heap overflow on crafted input. When the terminfo entry-description compiler processes input, proper bounds checking was not enforced leading to this software flaw. The highest threat from this vulnerability is system availability.
Clone Of:
Environment:
Last Closed:
devthomp: needinfo-


Attachments (Terms of Use)

Description Guilherme de Almeida Suckevicz 2021-09-22 18:47:17 UTC
An issue was discovered in ncurses through v6.2-1. _nc_captoinfo in captoinfo.c has a heap-based buffer overflow.

Reference:
https://lists.gnu.org/archive/html/bug-ncurses/2020-08/msg00006.html

Comment 3 devthomp 2021-09-23 18:05:20 UTC
full patch with fix:
https://github.com/mirror/ncurses/commit/790a85dbd4a81d5f5d8dd02a44d84f01512ef443#diff-7e95c7bc5f213e9be438e69a9d5d0f261a14952bcbd692f7b9014217b8047340

Of note:
+ add a check for end-of-string in cvtchar to handle a malformed
  string in infotocap (report/testcase by "puppet-meteor").

Comment 4 juneau 2021-09-24 12:39:24 UTC
Marking managed services affected/delegated. Code is present but impact is moderate.


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