Bug 1214489 (CVE-2020-19185)

Summary: VUL-0: CVE-2020-19185: ncurses: Buffer Overflow vulnerability in one_one_mapping function in progs/dump_entry.c:1373 in ncurses 6.1 allows remote attackers to cause a denial of service via crafted command.
Product: [Novell Products] SUSE Security Incidents Reporter: Stoyan Manolov <stoyan.manolov>
Component: IncidentsAssignee: Security Team bot <security-team>
Status: RESOLVED FIXED QA Contact: Security Team bot <security-team>
Severity: Normal    
Priority: P3 - Medium CC: meissner, security-team, stoyan.manolov
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Other   
URL: https://smash.suse.de/issue/375945/
Whiteboard: CVSSv3.1:SUSE:CVE-2020-19185:5.5:(AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H)
Found By: Security Response Team Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Stoyan Manolov 2023-08-23 06:53:06 UTC
CVE-2020-19185

Buffer Overflow vulnerability in one_one_mapping function in
progs/dump_entry.c:1373 in ncurses 6.1 allows remote attackers to cause a denial
of service via crafted command.

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2020-19185
https://www.cve.org/CVERecord?id=CVE-2020-19185
https://github.com/zjuchenyuan/fuzzpoc/blob/master/infotocap_poc1.md
Comment 2 Dr. Werner Fink 2023-09-12 09:30:54 UTC
I see on SLE-12

noether:/ # infotocap -o /dev/null /tmp/infotocap_poc1.md 
"/tmp/infotocap_poc1.md", line 1, col 1: Illegal character (expected alphanumeric or @%&*!#) - '{'
Comment 3 Dr. Werner Fink 2023-09-12 10:29:49 UTC
For SLE-15

noether:/ # rpm -Uhv home/abuild/rpmbuild/RPMS/x86_64/ncurses-devel-6.1-0.x86_64.rpm 
Preparing...                          ################################# [100%]
Updating / installing...
   1:ncurses-devel-6.1-0              ################################# [100%]
noether:/ # infotocap -o /dev/null /tmp/infotocap_poc1.md 
"/tmp/infotocap_poc1.md", line 1, col 1: Illegal character (expected alphanumeric or @%&*!#) - '{'
Comment 4 Dr. Werner Fink 2023-09-13 08:02:06 UTC
btw: the part

``allows remote attackers to cause a denial of service via crafted command''

seems to be very overdrawn ... the command infotocap(1)

  infotocap(1) - convert a terminfo description into a termcap description

is only called by a user which wants a termcap entry for an existing terminfo
description (see terminfo(5)) ... as most programs today uses ncurses, means terminfo descriptions the command tic(1) is common

  tic(1) - the terminfo entry-description compiler

nevertheless unkown and unchecked terminfo descriptions shouldn't be used at all.

Beside this the allready backported patches makes tic(1) to use also the checker code for terminfo descriptions :

noether:/ # tic -o /tmp/foobar /tmp/infotocap_poc6.md 
"/tmp/infotocap_poc6.md", line 1, col 1: Illegal character (expected alphanumeric or @%&*!#) - '{'
noether:/ # rm -rf /tmp/foobar