Bug 1670254 (CVE-2019-3822)
Summary: | CVE-2019-3822 curl: NTLMv2 type-3 header stack buffer overflow | ||
---|---|---|---|
Product: | [Other] Security Response | Reporter: | Sam Fowler <sfowler> |
Component: | vulnerability | Assignee: | Red Hat Product Security <security-response-team> |
Status: | CLOSED ERRATA | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | unspecified | CC: | abhgupta, andrew.slice, bodavis, csutherl, dbaker, dbhole, gzaronik, hhorak, jclere, john.j5live, jokerman, jorton, kanderso, kdudka, lgao, luhliari, mbabacek, msekleta, mturk, myarboro, omajid, paul, psampaio, rwagner, security-response-team, sthangav, trankin, twalsh, weli |
Target Milestone: | --- | Keywords: | Security |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | curl 7.64.0 | Doc Type: | If docs needed, set a value |
Doc Text: |
A stack-based buffer overflow was found in the way curl handled NTLMv2 type-3 headers. When connecting to a remote malicious server which uses NTLM authentication, the flaw could cause curl to crash.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2019-11-06 00:52:00 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1672905, 1674355, 1674356 | ||
Bug Blocks: | 1670258 |
Description
Sam Fowler
2019-01-29 04:18:42 UTC
Acknowledgments: Name: Daniel Stenberg (the Curl project) Upstream: Wenxiang Qian (Tencent Blade Team) External Reference: https://curl.haxx.se/docs/CVE-2019-3822.html Upstream Patch: https://github.com/curl/curl/commit/50c94842 Created curl tracking bugs for this issue: Affects: fedora-all [bug 1672905] Commit 86724581b6c was not backported for rhel-5/6/7 therefore these packages are not affected. Versions of curl package shipped with Fedora are compiled with StackGuard enabled: On disassembling the function (using Fedora 26) noticed that the function has the usual stackguard prologue and epilogue: (gdb) disass Curl_auth_create_ntlm_type3_message Dump of assembler code for function Curl_auth_create_ntlm_type3_message: 0x000000000005d820 <+0>: push %r15 0x000000000005d822 <+2>: push %r14 0x000000000005d824 <+4>: mov %rdi,%r15 0x000000000005d827 <+7>: push %r13 0x000000000005d829 <+9>: push %r12 0x000000000005d82b <+11>: mov %rdx,%r14 0x000000000005d82e <+14>: push %rbp 0x000000000005d82f <+15>: push %rbx 0x000000000005d830 <+16>: mov %rcx,%rbx 0x000000000005d833 <+19>: pxor %xmm0,%xmm0 0x000000000005d837 <+23>: mov %rsi,%rbp 0x000000000005d83a <+26>: sub $0x8f8,%rsp 0x000000000005d841 <+33>: mov $0x5c,%esi 0x000000000005d846 <+38>: mov %fs:0x28,%rax <- notice the stack cookie being pushed on the stack 0x000000000005d84f <+47>: mov %rax,0x8e8(%rsp) and later in the function (during the exit) 0x000000000005d95c <+316>: mov 0x8e8(%rsp),%rbx 0x000000000005d964 <+324>: xor %fs:0x28,%rbx <- stack cookie being checked 0x000000000005d96d <+333>: jne 0x5defb <Curl_auth_create_ntlm_type3_message+1755> Where the jne points to: 0x000000000005defb <+1755>: callq 0xb718 Which uses the plt to jump to __stack_chk_fail This really implies that the function has stackguard correctly working. It is most likely that the overflow of ntlmbuf will change the stack-cookie and which will trigger a crash during function return and mitigate any chances of code execution. More details about stackguard is available at: https://access.redhat.com/blogs/766093/posts/3548631 Mitigation: Turn off NTLM authentication. Statement: The versions of curl package shipped with Red Hat Enterprise Linux 5, 6, and 7 do not support NTLMv2 type-3 headers, hence they are not affected by this flaw. This issue has been addressed in the following products: Red Hat Enterprise Linux 8 Via RHSA-2019:3701 https://access.redhat.com/errata/RHSA-2019:3701 This bug is now closed. Further updates for individual products will be reflected on the CVE page(s): https://access.redhat.com/security/cve/cve-2019-3822 |