[Mono-bugs] [Bug 78456][Nor] New - Impersonation via setresuid crashes runtime

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri May 19 07:54:08 EDT 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by pawel.sakowski at mind-breeze.com.

http://bugzilla.ximian.com/show_bug.cgi?id=78456

--- shadow/78456	2006-05-19 07:54:07.000000000 -0400
+++ shadow/78456.tmp.1951	2006-05-19 07:54:07.000000000 -0400
@@ -0,0 +1,60 @@
+Bug#: 78456
+Product: Mono: Runtime
+Version: 1.1
+OS: GNU/Linux [Other]
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: io-layer
+AssignedTo: dick at ximian.com                            
+ReportedBy: pawel.sakowski at mind-breeze.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Impersonation via setresuid crashes runtime
+
+Description of Problem:
+A call to WindowsIdentity.Impersonate renders the runtime pretty much
+unusable. Due to altered (insufficient) permissions, it can't execute its
+basic functionality.
+
+Steps to reproduce the problem:
+1. Compile the following code:
+
+using System.Security.Principal;
+using System.Threading;
+class Test {
+	static void Main() {
+		new WindowsIdentity("nobody").Impersonate();
+		new Thread(Nothing).Start();
+	}
+	static void Nothing() {
+		Thread.Sleep(100000);
+	}
+}
+
+2. Execute it as root.
+
+Actual Results:
+** ERROR **: file handles.c: line 1669 (_wapi_handle_update_refs):
+assertion failed: (thr_ret == 0)
+aborting...
+
+** ERROR **: file handles.c: line 234 (_wapi_handle_new_shared): assertion
+failed: (thr_ret == 0)
+aborting...
+Aborted
+
+Expected Results:
+silence
+
+How often does this happen? 
+100%. The amount of errors reported and the exact place where they occur
+varies randomly, among all the assertions on (thr_ret == 0) in handles.c
+
+Additional Information:
+strace shows that the reason is an EACCESS on semop -- which is not
+surprising, given that the euid has been modified.


More information about the mono-bugs mailing list