Bug 229134 - http 500 error running .aspx scripts with mod_mono
Summary: http 500 error running .aspx scripts with mod_mono
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: mod_mono
Version: 6
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Paul F. Johnson
QA Contact: Fedora Extras Quality Assurance
URL: http://forums.fedoraforum.org/showthr...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-02-18 01:28 UTC by John Mahowald
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2007-02-18 21:36:29 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description John Mahowald 2007-02-18 01:28:18 UTC
Description of problem:
Running .aspx scripts with mod_mono gives an error in running mod_mono_server

Version-Release number of selected component (if applicable): mod_mono 1.1.18-1.fc6


How reproducible: always


Steps to Reproduce:
1. install mod_mono
2. put some helloworld.aspx script in DocumentRoot
3. access http://localhost/helloworld.aspx
  
Actual results:
http 500 internal server error

error_log:
[error] Failed running '/usr/lib64/pkgconfig/../../b
in/mod-mono-server --filename /tmp/mod_mono_server__XXGLOBAL --nonstop --master
 (null) (null) (null) (null) (null) (null) (null) (null)'. Reason: No such file
 or directory

Expected results:
Run the script.

Comment 1 Paul F. Johnson 2007-02-18 01:37:05 UTC
Can you attach the script you're trying to run? I'll see if I can reproduce it
here on my rawhide box - lots have changed to mod_mono and xsp since FC6

Comment 2 John Mahowald 2007-02-18 01:47:56 UTC
It works even with an empty .aspx file. It can't run the hander without xsp,
which doesn't seem to be explicit in the mod_mono requirements.

-----

As noted at FedoraForum, installing xsp provides mod_mono_server, which probably
should be required by mod_mono.

When xsp is installed selinux won't allow it: 

avc:  denied  { execute } for  pid=12845 comm="mod-mono-server" name="mono"
dev=sda6 ino=11375637 scontext=user_u:system_r:httpd_t:s0
tcontext=system_u:object_r:mono_exec_t:s0 tclass=file

It triggered the setroubleshoot httpd_bad_labels plugin. setroubleshoot notes
/usr/bin/mono  is labeled mono_exec_t.

Comment 3 John Mahowald 2007-02-18 01:50:53 UTC
Correction: it doesn't work with any file running the mod_mono handler.

Comment 4 Paul F. Johnson 2007-02-18 01:56:58 UTC
Drat it. Just checked, I'm not using SELinux which is why it worked fine. Let me
check what's going on and I'll get back to you.

Comment 5 Paul F. Johnson 2007-02-18 01:58:49 UTC
Looks like I'll need to get some selinux recipe together for it... Blast.

Comment 6 Russell Odom 2007-02-18 12:23:13 UTC
I installed mod_mono yesterday and also discovered the missing dependency on
xsp, which I've now installed manually. My helloworld.aspx also gives a 500
internal server error, and I see these error messages in /var/log/audit/audit.log:

type=AVC msg=audit(1171740118.470:36634): avc:  denied  { execute } for 
pid=20136 comm="mod-mono-server" name="mono" dev=md1 ino=3853745
scontext=user_u:system_r:httpd_t:s0 tcontext=system_u:object_r:mono_exec_t:s0
tclass=file
type=AVC msg=audit(1171740118.470:36634): avc:  denied  { execute_no_trans } for
 pid=20136 comm="mod-mono-server" name="mono" dev=md1 ino=3853745
scontext=user_u:system_r:httpd_t:s0 tcontext=system_u:object_r:mono_exec_t:s0
tclass=file
type=AVC msg=audit(1171740118.470:36634): avc:  denied  { read } for  pid=20136
comm="mod-mono-server" name="mono" dev=md1 ino=3853745
scontext=user_u:system_r:httpd_t:s0 tcontext=system_u:object_r:mono_exec_t:s0
tclass=file
type=SYSCALL msg=audit(1171740118.470:36634): arch=c000003e syscall=59
success=yes exit=0 a0=8c52f0 a1=8c5030 a2=8c5670 a3=8 items=0 ppid=20135
pid=20136 auid=500 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48
fsgid=48 tty=(none) comm="mono" exe="/usr/bin/mono"
subj=user_u:system_r:httpd_t:s0 key=(null)
type=AVC_PATH msg=audit(1171740118.470:36634):  path="/usr/bin/mono"
type=AVC_PATH msg=audit(1171740118.470:36634):  path="/usr/bin/mono"
type=AVC msg=audit(1171740118.472:36635): avc:  denied  { execmem } for 
pid=20136 comm="mono" scontext=user_u:system_r:httpd_t:s0
tcontext=user_u:system_r:httpd_t:s0 tclass=process
type=SYSCALL msg=audit(1171740118.472:36635): arch=c000003e syscall=9
success=yes exit=1073741824 a0=0 a1=10000 a2=7 a3=62 items=0 ppid=20135
pid=20136 auid=500 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48
fsgid=48 tty=(none) comm="mono" exe="/usr/bin/mono"
subj=user_u:system_r:httpd_t:s0 key=(null)
type=AVC msg=audit(1171740119.415:36636): avc:  denied  { create } for 
pid=20150 comm="mono" name="mod_mono_server__XXGLOBAL"
scontext=user_u:system_r:httpd_t:s0 tcontext=user_u:object_r:tmp_t:s0
tclass=sock_file
type=SYSCALL msg=audit(1171740119.415:36636): arch=c000003e syscall=49
success=yes exit=0 a0=a a1=912b70 a2=21 a3=0 items=0 ppid=1 pid=20150 auid=500
uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none)
comm="mono" exe="/usr/bin/mono" subj=user_u:system_r:httpd_t:s0 key=(null)
type=AVC msg=audit(1171740119.525:36637): avc:  denied  { ptrace } for 
pid=20136 comm="mono" scontext=user_u:system_r:httpd_t:s0
tcontext=user_u:system_r:httpd_t:s0 tclass=process
type=SYSCALL msg=audit(1171740119.525:36637): arch=c000003e syscall=4
success=yes exit=0 a0=7fff94f5fbd0 a1=7fff94f5fb40 a2=7fff94f5fb40 a3=2 items=0
ppid=1 pid=20136 auid=500 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48
fsgid=48 tty=(none) comm="mono" exe="/usr/bin/mono"
subj=user_u:system_r:httpd_t:s0 key=(null)
type=AVC msg=audit(1171740179.467:36638): avc:  denied  { write } for  pid=20133
comm="httpd" name="mod_mono_server__XXGLOBAL" dev=md1 ino=4563092
scontext=user_u:system_r:httpd_t:s0 tcontext=user_u:object_r:tmp_t:s0
tclass=sock_file
type=AVC msg=audit(1171740179.467:36639): avc:  denied  { unlink } for 
pid=20133 comm="httpd" name="mod_mono_server__XXGLOBAL" dev=md1 ino=4563092
scontext=user_u:system_r:httpd_t:s0 tcontext=user_u:object_r:tmp_t:s0
tclass=sock_file

Not sure if it's related, but I also get several lines like this in 
/var/log/httpd/error_log:
Another mod-mono-server with the same arguments is already running.

[root@detritus ~]# rpm -q mod_mono xsp selinux-policy selinux-policy-targeted
mod_mono-1.1.18-1.fc6.x86_64
xsp-1.1.18-1.fc6.x86_64
selinux-policy-2.4.6-37.fc6.noarch
selinux-policy-targeted-2.4.6-37.fc6.noarch
[root@detritus ~]# uname -a
Linux detritus.local 2.6.19-1.2895.fc6 #1 SMP Wed Jan 10 18:50:56 EST 2007
x86_64 x86_64 x86_64 GNU/Linux

It might be an idea to update the summary to include "xsp" and "SELinux" to make
this bug easier to find.

Comment 7 Paul F. Johnson 2007-02-18 15:23:56 UTC
Can you try the versions of xsp and mod_mono in rawhide and see if that helps?

Comment 8 Russell Odom 2007-02-18 17:17:40 UTC
Yes, that seems to have done the trick, thanks!

[root@detritus ~]# rpm -q xsp mod_mono
xsp-1.2.1-1.fc7.x86_64
mod_mono-1.2.1-1.fc7.x86_64

It looks like the mod_mono RPM still needs to be made to require xsp on
installation, though.

Comment 9 Paul F. Johnson 2007-02-18 21:36:29 UTC
Okay, I've updated the version in FC6 to be the same as in rawhide. Thanks for
the feedback.




Note You need to log in before you can comment on or make changes to this bug.