Facebook Google Plus Twitter LinkedIn YouTube RSS Menu Search Resource - BlogResource - WebinarResource - ReportResource - Eventicons_066 icons_067icons_068icons_069icons_070

IBM Spectrum Protect Verb 134 Unauthenticated Remote Stack Overflow

Critical

Synopsis

Tenable has discovered an unauthenticated remote stack buffer overflow vulnerability in IBM Spectrum Protect 8.1.9. The flaws exists in the SmIsValidVerbEx function in the adsmdll.dll file due to improper validation of user-supplied data when processing a verb 134 message over TCP port 1500.

The following snippet shows the vulnerability with annotated comments:

.text:0000000180996D33      mov     rdx, [rsp+0B8h+filespaceP] ; attacker-controlled data
.text:0000000180996D38      lea     rcx, [rsp+0B8h+Dst] ; fixed_size buf on the stack
.text:0000000180996D3D      mov     r8, rax ; attacker-controlled copy size -> stack overflow !
.text:0000000180996D40      call    memcpy_0

Proof of Concept

ibm_spectrum_protect_verb_134_stack_overflow_CVE-2020-4415.py

Attached is a PoC to terminate dsmsvc.exe. The PoC can be used as follows:

	python ibm_spectrum_protect_verb_134_stack_overflow_CVE-2020-4415.py -t  -p 1500

The crash of dsmsvc.exe is shown in Windbg and the Windbg !exploitable extension shows the vulnerability is exploitable:

0:407> g
(1fb0.1930): Security check failure or stack buffer overrun - code c0000409 (!!! second chance !!!)
rax=0000000000000001 rbx=0000000000000000 rcx=0000000000000002
rdx=0000000000000003 rsi=0000028096541400 rdi=00000280978e3b70
rip=00007ffb1bd269dc rsp=000000b6ec4fe6c0 rbp=0000000000000000
 r8=00000280bbc8ae20  r9=0000000000000022 r10=0000000000000022
r11=000000000000021e r12=0000000000000100 r13=00000280978e3b7f
r14=0000000000000001 r15=4141414141414141
iopl=0         nv up ei pl nz na pe nc
cs=0033  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000202
adsmdll!_report_gsfailure+0x1c:
00007ffb`1bd269dc cd29            int     29h
0:407> k 10
 # Child-SP          RetAddr           Call Site
00 000000b6`ec4fe6c0 00007ffb`1b9d4d48 adsmdll!_report_gsfailure+0x1c
01 000000b6`ec4fe700 41414141`41414141 adsmdll!SmIsValidVerbEx+0x164a8
02 000000b6`ec4fe7c0 41414141`41414141 0x41414141`41414141
03 000000b6`ec4fe7c8 41414141`41414141 0x41414141`41414141
04 000000b6`ec4fe7d0 41414141`41414141 0x41414141`41414141
05 000000b6`ec4fe7d8 41414141`41414141 0x41414141`41414141
06 000000b6`ec4fe7e0 41414141`41414141 0x41414141`41414141
07 000000b6`ec4fe7e8 41414141`41414141 0x41414141`41414141
08 000000b6`ec4fe7f0 41414141`41414141 0x41414141`41414141
09 000000b6`ec4fe7f8 41414141`41414141 0x41414141`41414141
0a 000000b6`ec4fe800 41414141`41414141 0x41414141`41414141
0b 000000b6`ec4fe808 41414141`41414141 0x41414141`41414141
0c 000000b6`ec4fe810 41414141`41414141 0x41414141`41414141
0d 000000b6`ec4fe818 41414141`41414141 0x41414141`41414141
0e 000000b6`ec4fe820 41414141`41414141 0x41414141`41414141
0f 000000b6`ec4fe828 41414141`41414141 0x41414141`41414141
0:407> .load msec.dll
0:407> !exploitable

!exploitable 1.6.0.0
Exploitability Classification: EXPLOITABLE
Recommended Bug Title: Exploitable - Stack Buffer Overrun (/GS Exception) starting at adsmdll!_report_gsfailure+0x000000000000001c (Hash=0xbdd8d674.0x7e87e5be)

An overrun of a protected stack buffer has been detected. This is considered exploitable, and must be fixed.
0:407> lm vm adsmdll
Browse full module list
start             end                 module name
00007ffb`1b030000 00007ffb`1e61b000   adsmdll    (pdb symbols)          C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\sym\adsmdll.pdb\AA09604A60F044BA8E25393F5CD6681E3\adsmdll.pdb
    Loaded symbol image file: C:\PROGRA~1\Tivoli\TSM\Server\adsmdll.dll
    Image path: C:\PROGRA~1\Tivoli\TSM\Server\adsmdll.dll
    Image name: adsmdll.dll
    Browse all global symbols  functions  data
    Timestamp:        Fri Dec 20 13:00:35 2019 (5DFD0C43)
    CheckSum:         034ABF92
    ImageSize:        035EB000
    File version:     8.1.9.19354
    Product version:  8.1.9.19354
    File flags:       0 (Mask 3F)
    File OS:          40000 NT Base
    File type:        2.0 Dll
    File date:        00000000.00000000
    Translations:     0409.04b0
    Information from resource tables:
        CompanyName:      IBM Corporation
        ProductName:      IBM Spectrum Protect
        InternalName:     ADSMDLL.DLL
        OriginalFilename: ADSMDLL.DLL
        ProductVersion:   88
        FileVersion:      88
        PrivateBuild:     88
        SpecialBuild:     88
        FileDescription:  IBM Spectrum Protect Server Main DLL
        LegalCopyright:   Copyright © 1996, 2019 IBM
        LegalTrademarks:  Copyright © 1996, 2019 IBM
        Comments:         Version:88

Solution

Upgrade to 7.1.10.100 or 8.1.9.300.

Disclosure Timeline

03/09/2020 - Vulnerability discovered
03/12/2020 - Tenable asks HackerOne and IBM tech support for specific email to report the vulnerability to.
03/17/2020 - Reported vulnerability to CERT/CC. Tracked as VRF#20-03-NXLCC.
03/17/2020 - CERT sends automated reply.
03/25/2020 - CERT lets us know that they have forwarded our report IBM with the goal of IBM responding to us directly.
03/25/2020 - Tenable thanks CERT.
03/25/2020 - CERT asks Tenable to explain the problem Tenable has with the HackerOne/IBM disclosure agreement.
03/25/2020 - Tenable points out that the agreement conflicts with Tenable's disclosure policy.
03/30/2020 - CERT asks if they can pass on the message to IBM.
03/30/2020 - Tenable says of course.
04/07/2020 - CERT asks if an updated version of the agreement is acceptable.
04/07/2020 - Tenable says no and restates the conflict.
04/21/2020 - Tenable asks for an update.
04/21/2020 - CERT has not heard back from IBM about this vulnerability since IBM ACK'd on 03/26.
04/22/2020 - Tenable thanks CERT for the update.
04/22/2020 - CERT notifies Tenable that IBM has disclosed.
04/22/2020 - Tenable thanks CERT.

All information within TRA advisories is provided “as is”, without warranty of any kind, including the implied warranties of merchantability and fitness for a particular purpose, and with no guarantee of completeness, accuracy, or timeliness. Individuals and organizations are responsible for assessing the impact of any actual or potential security vulnerability.

Tenable takes product security very seriously. If you believe you have found a vulnerability in one of our products, we ask that you please work with us to quickly resolve it in order to protect customers. Tenable believes in responding quickly to such reports, maintaining communication with researchers, and providing a solution in short order.

For more details on submitting vulnerability information, please see our Vulnerability Reporting Guidelines page.

If you have questions or corrections about this advisory, please email [email protected]

Risk Information

CVE ID: CVE-2020-4415
Tenable Advisory ID: TRA-2020-26
CVSSv2 Base / Temporal Score:
10.0 / 7.8
CVSSv2 Vector:
(AV:N/AC:L/Au:N/C:C/I:C/A:C)
Affected Products:
IBM Spectrum Protect Server 8.1.0.0-8.1.9.200
Spectrum Protect Server 7.1.0.0-7.1.10.0
Risk Factor:
Critical
Additional Keywords:
VU#240221