Bugzilla – Bug 1046853
VUL-0: CVE-2017-10685: ncurses: possible RCE with format string vulnerability in the fmt_entry function
Last modified: 2018-10-07 14:39:17 UTC
rh#1464692 In ncurses 6.0, there is a format string vulnerability in the fmt_entry function. A crafted input will lead to a remote arbitrary code execution attack. References: https://bugzilla.redhat.com/show_bug.cgi?id=1464692 http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-10685 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-10685
Created attachment 730885 [details] CVE-2017-10685.POC6
To reproduce this problem you need to install ncurses-devel. /usr/bin/infotocap It was not possible to reproduce the problem and crash infotocap. Valgrind is showing an error in its output. #> valgrind infotocap CVE-2017-10685.POC6 ... ==10724== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Good news Leap 42.2 and therefore SLES-12 are not affected as the example found in https://bugzilla.redhat.com/show_bug.cgi?id=1464687 does not work: werner/POC4> captoinfo POC4 "POC4", line 1, col 4, terminal 'l': unknown capability 'l' "POC4", line 1, col 609, terminal 'l': Very long string found. Missing separator? "POC4", line 1, col 1147, terminal 'l': Missing separator "POC4", line 1, col 1147, terminal 'l': unknown % code x (0x78) in xll "POC4", line 1, col 1147, terminal 'l': unknown % code M-~ (0xfe) in xll "POC4", line 1, col 1147, terminal 'l': unknown % code M-~ (0xfe) in xll l, bel=^G, cr=^M, cud1=^J, ht=^I, ind=^J, kbs=^H, kcub1=^H, kcud1=^J, nel=^M^J, pfxl=%p1%{10}%/%{16}%*%p1%{10}%m%+\266xli\377%xn79llN%p0%{10}%/%{16}%*%p0%{10}%m%+ll=%p0%{10}%/%{16}%*%p0%{10}%m%+\251W=%p/%{10}%/%{16}%*%p/%{10}%m%+\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\023\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276\276ll=%p/%{10}%/%{16}%*%p/%{10}%m%+\251\251l6\207\251ll=%p/%{10}%/%{16}%*%p/%{10}%m%+ll=%p/%{10}%/%{16}%*%p/%{10}%m%+%p/%{10}%/%{16}%*%p/%{10}%m%+|l\377\377 %\376l=%p/%{10}%/%{16}%*%p/%{10}%m%+ll6c6\276\251\251\251\251\251\251\251\211\251l=@6\251ll6%p-%{10}%/%{16}%*%p-%{10}%m%+\251\251\241l=%p-%{10}%/%{16}%*%p-%{10}%m%+ll6%p-%{10}%/%{16}%*%p-%{10}%m%+\276\251\251\251\251\251\251\251\251\251x\377 \377\377ll=%p+%{10}%/%{16}%*%p+%{10}%m%+|l\377\377 %\376l=%p+%{10}%/%{16}%*%p+%{10}%m%+ll6%p+%{10}%/%{16}%*%p+%{10}%m%+\276\251\251\251\251\251\251\251\211\377\0x?\011G2,
(In reply to Alexander Bergmann from comment #2) > To reproduce this problem you need to install ncurses-devel. > > /usr/bin/infotocap > > It was not possible to reproduce the problem and crash infotocap. Valgrind > is showing an error in its output. > > #> valgrind infotocap CVE-2017-10685.POC6 > ... > ==10724== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) Ah ... yes indeed I *always* install ncurses-devel on host I'm working ;) your example shows werner/POC4> infotocap POC6 "POC6", line 1, col 117, terminal 'l': Illegal character '^V' in \ sequence "POC6", line 1, col 610, terminal 'l': Very long string found. Missing separator? "POC6", line 1, col 1494, terminal 'l': Illegal character '^V' in \ sequence "POC6", line 1, col 1585, terminal 'l': Missing separator "POC6", line 2, col 12, terminal '222222A2': Illegal character - '^J' "POC6", line 2, col 12, terminal '222222A2': unknown capability '2' # (untranslatable capabilities removed to fit entry within 1023 bytes) # (terminfo-only capabilities suppressed to fit entry within 1023 bytes) warning: l entry is 4122 bytes long # WARNING: this entry, 4122 bytes long, may core-dump older termcap libraries! l:\ :bl=\236\236\236\236\236\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\326\370\377\377\377\0\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\3702222222\377\17722\026\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\361\370\370\370\371\r\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\370\37: 222222A2:
Btw: I suspect a crash with infotocap or captoinfo ... or is this a wrong guess?
Nevertheless I'll wait on the next release on http://lists.gnu.org/archive/html/bug-ncurses/ to see the official fix.
???? Codestreams: ------------ SUSE:SLE-12:Update SUSE:SLE-10-SP3:Update SUSE:SLE-11:Update - Package Submission ETA: July 7, 2017 ... can we first check if those old products are effected? ncurses-5.5 for SUSE:SLE-10-SP3 ncurses-5.6 for SUSE:SLE-11(-SP4) ncurses-5.9 for SUSE:SLE-12 beside this I'll wait upto upstream has a patch for this.
See comment #7
Created attachment 730998 [details] ncurses-5.9-bsc1046853_1046858.dif Backport of parts of patchlevel 20170701 for ncurses 6.0
Created attachment 731004 [details] ncurses-5.6-bsc1046853_1046858.dif Backport of parts of patchlevel 20170701 for ncurses 6.0
Accordingly to osc -A https://api.suse.de the SUSE:SLE-10-SP3 does not exist isc se ncurses | grep ^SUSE SUSE:Factory:Head ncurses SUSE:Factory:Head:Frozen ncurses SUSE:SLE-10-SP0:GA ncurses SUSE:SLE-10-SP1:GA ncurses SUSE:SLE-10-SP2:GA ncurses SUSE:SLE-11:GA ncurses SUSE:SLE-12:GA ncurses SUSE:SLE-12:Rings:0-Bootstrap ncurses SUSE:SLE-9-SP3:GA ncurses SUSE:SLE-9-SP4:GA ncurses as well as SLES 10 is out of scope
SR#507763 extern SR#135270 SLES 11 SR#135269 SLES 12 and extern Leap 42.2
This is an autogenerated message for OBS integration: This bug (1046853) was mentioned in https://build.opensuse.org/request/show/507763 Factory / ncurses
SR#135299 for SUSE:SLE-10-SP3:Update:Test/ncurses
An update workflow for this issue was started. This issue was rated as important. Please submit fixed packages until 2017-07-13. When done, reassign the bug to security-team@suse.de. https://swamp.suse.de/webswamp/wf/63757
SUSE-SU-2017:1790-1: An update that fixes two vulnerabilities is now available. Category: security (important) Bug References: 1046853,1046858 CVE References: CVE-2017-10684,CVE-2017-10685 Sources used: SUSE Linux Enterprise Software Development Kit 11-SP4 (src): ncurses-5.6-92.1 SUSE Linux Enterprise Server 11-SP4 (src): ncurses-5.6-92.1 SUSE Linux Enterprise Debuginfo 11-SP4 (src): ncurses-5.6-92.1
SUSE-SU-2017:1815-1: An update that solves two vulnerabilities and has one errata is now available. Category: security (important) Bug References: 1000662,1046853,1046858 CVE References: CVE-2017-10684,CVE-2017-10685 Sources used: SUSE Linux Enterprise Software Development Kit 12-SP2 (src): ncurses-5.9-44.1 SUSE Linux Enterprise Server for Raspberry Pi 12-SP2 (src): ncurses-5.9-44.1 SUSE Linux Enterprise Server 12-SP2 (src): ncurses-5.9-44.1 SUSE Linux Enterprise Desktop 12-SP2 (src): ncurses-5.9-44.1 OpenStack Cloud Magnum Orchestration 7 (src): ncurses-5.9-44.1
This is an autogenerated message for OBS integration: This bug (1046853) was mentioned in https://build.opensuse.org/request/show/509084 Factory / ncurses
This is an autogenerated message for OBS integration: This bug (1046853) was mentioned in https://build.opensuse.org/request/show/509422 Factory / ncurses
openSUSE-SU-2017:1882-1: An update that solves two vulnerabilities and has one errata is now available. Category: security (important) Bug References: 1000662,1046853,1046858 CVE References: CVE-2017-10684,CVE-2017-10685 Sources used: openSUSE Leap 42.2 (src): ncurses-5.9-55.3.1
SUSE-SU-2017:2075-1: An update that solves four vulnerabilities and has one errata is now available. Category: security (moderate) Bug References: 1046853,1046858,1047964,1047965,1049344 CVE References: CVE-2017-10684,CVE-2017-10685,CVE-2017-11112,CVE-2017-11113 Sources used: SUSE Linux Enterprise Software Development Kit 12-SP3 (src): ncurses-5.9-50.1 SUSE Linux Enterprise Software Development Kit 12-SP2 (src): ncurses-5.9-50.1 SUSE Linux Enterprise Server for Raspberry Pi 12-SP2 (src): ncurses-5.9-50.1 SUSE Linux Enterprise Server 12-SP3 (src): ncurses-5.9-50.1 SUSE Linux Enterprise Server 12-SP2 (src): ncurses-5.9-50.1 SUSE Linux Enterprise Desktop 12-SP3 (src): ncurses-5.9-50.1 SUSE Linux Enterprise Desktop 12-SP2 (src): ncurses-5.9-50.1 OpenStack Cloud Magnum Orchestration 7 (src): ncurses-5.9-50.1
SUSE-SU-2017:2076-1: An update that solves four vulnerabilities and has one errata is now available. Category: security (moderate) Bug References: 1046853,1046858,1047964,1047965,1049344 CVE References: CVE-2017-10684,CVE-2017-10685,CVE-2017-11112,CVE-2017-11113 Sources used: SUSE Linux Enterprise Software Development Kit 11-SP4 (src): ncurses-5.6-93.6.1 SUSE Linux Enterprise Server 11-SP4 (src): ncurses-5.6-93.6.1 SUSE Linux Enterprise Debuginfo 11-SP4 (src): ncurses-5.6-93.6.1
openSUSE-SU-2017:2158-1: An update that solves four vulnerabilities and has one errata is now available. Category: security (moderate) Bug References: 1046853,1046858,1047964,1047965,1049344 CVE References: CVE-2017-10684,CVE-2017-10685,CVE-2017-11112,CVE-2017-11113 Sources used: openSUSE Leap 42.3 (src): ncurses-5.9-59.1 openSUSE Leap 42.2 (src): ncurses-5.9-55.6.1
SUSE-SU-2017:2470-1: An update that solves 18 vulnerabilities and has 46 fixes is now available. Category: security (important) Bug References: 1004995,1009745,1014471,1017420,1019637,1026825,1027079,1027688,1027908,1028281,1028723,1029523,1031756,1032706,1033236,1035062,1036659,1038132,1038444,1038984,1042392,1043218,1043333,1044095,1044107,1044175,1044840,1045384,1045735,1045987,1046268,1046417,1046659,1046853,1046858,1047008,1047236,1047240,1047310,1047379,1047785,1047964,1047965,1048315,1048483,1048605,1048679,1048715,1049344,1050396,1050484,1051626,1051643,1051644,1052030,1052759,1053409,874665,902364,938657,944903,954661,960820,963041 CVE References: CVE-2013-7459,CVE-2016-9063,CVE-2017-1000100,CVE-2017-1000101,CVE-2017-10684,CVE-2017-10685,CVE-2017-11112,CVE-2017-11113,CVE-2017-3308,CVE-2017-3309,CVE-2017-3453,CVE-2017-3456,CVE-2017-3464,CVE-2017-7435,CVE-2017-7436,CVE-2017-8872,CVE-2017-9233,CVE-2017-9269 Sources used: SUSE Container as a Service Platform ALL (src): caasp-container-manifests-0.0.0+git_r155_93e40ab-2.3.3, container-feeder-0.0.0+20170901.git_r55_17ecbd3-2.3.3, sles12-mariadb-docker-image-1.1.0-2.3.10, sles12-pause-docker-image-1.1.0-2.3.11, sles12-pv-recycler-node-docker-image-1.1.0-2.3.10, sles12-salt-api-docker-image-1.1.0-2.3.9, sles12-salt-master-docker-image-1.1.0-4.3.10, sles12-salt-minion-docker-image-1.1.0-2.3.8, sles12-velum-docker-image-1.1.0-4.3.9
released