Adobe Flash Player ShimAdPolicySelector(adPolicySelectorType=0) class Memory Corruption
Adobe Flash Player fails to properly validate the parameter of ShimAdPolicySelector.selectAdBreaksToPlay(), leading to memory corruption and a crash when an invalid AdPolicyInfo instance is passed.
- Fixed in 41 days
- Paid in 41 days
- Disclosed after 3.3 years
I. Summary Adobe Flash Player is prone to a vulnerability which leads to memory corruption because of improper validation of ShimAdPolicySelector.selectAdBreaksToPlay().
II. Description Normally, selectAdBreaksToPlay() should validate its parameter returns error in AS3 level if anything goes wrong. However, if ShimAdPolicySelector is constructed with adPolicySelectorType=0, then invoking selectAdBreaksToPlay() with invalid AdPolicyInfo instance, some inner fields of ShimAdPolicySelector will be absent, which will cause a memory crash.
POC Source Code:
package { import com.adobe.tvsdk.mediacore.MediaPlayerItem; import com.adobe.tvsdk.mediacore.timeline.advertising.policy.AdPolicyInfo; import com.adobe.tvsdk.mediacore.timeline.advertising.policy.ShimAdPolicySelector; import flash.display.Sprite;
public class poc extends Sprite
{
public function poc()
{
var mp:MediaPlayerItem;
var ap:AdPolicyInfo;
var obj:ShimAdPolicySelector = new ShimAdPolicySelector(0,mp);
obj.selectAdBreaksToPlay(ap);
}
}
}
III. Impact Memory Corruption
IV. Affected Adobe Flash Player 21.0.0.242.
V. Credit Wen Guanxing from Pangu LAB is credited for this vulnerability.
It has been assigned as CVE-2016-4188 by Adobe: https://helpx.adobe.com/security/products/flash-player/apsb16-25.html
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely, the ShimAdPolicySelector constructor with adPolicySelectorType=0 does not initialise all internal fields, and selectAdBreaksToPlay() does not validate its AdPolicyInfo parameter, leading to a memory crash.
Impact
Memory corruption, which causes a crash.
What the attacker needed
Adobe Flash Player [redacted]; Ability to run ActionScript code
How it was found
- Create a ShimAdPolicySelector object with adPolicySelectorType set to 0 and a MediaPlayerItem.
- Call selectAdBreaksToPlay() on that object with an uninitialised AdPolicyInfo instance.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
This report describes a bug in Adobe Flash Player, a program that runs multimedia content. The bug is in a function that handles advertising breaks; when given bad input, it can crash the program or corrupt memory. The report includes a small test program that triggers the crash.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.