Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
grsec: denied untrusted exec of ...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
shimon
n00b
n00b


Joined: 12 Mar 2005
Posts: 16

PostPosted: Sun Sep 17, 2006 8:40 pm    Post subject: grsec: denied untrusted exec of ... Reply with quote

hello,

I just migrated to kernel-2.6, I used hardened sources and grsecurity (this is my first time with both). Now I'm having problems with my system. I can't run scripts saved in my /home partion. It says:

Code:

grsec: denied untrusted exec of /home/***/scripts/my_script.sh by /bin/bash[bash:9402] uid/euid:502/502 gid/egid:100/100, parent /bin/bash[bash:16337] uid/euid:502/502 gid/egid:100/100
-su: /home/***/scripts/my_script.sh: /bin/bash: bad interpreter: Permission denied


and it's happening not only with /home resident scripts, it also happens with /usr, mailman can't use certain codecs:

Code:

grsec: denied untrusted exec of /usr/local/mailman/pythonlib/japanese/c/_japanese_codecs.so by /usr/bin/python2.2[python:15853] uid/euid:280/280 gid/egid:280/280, parent /usr/bin/cron[cron:32466] uid/euid:0/0 gid/egid:0/0


/usr is also another partition.

I tried using ``defaults'' as the fstab option to mount /home and /usr as suggested by https://forums.gentoo.org/viewtopic.php?p=873840 but it doesn't help at all. The last post of that thread comments on writing the options after user/s but I trully don't know what it means, and as it says, the options are reset to ones I don't want.

Thank you all for your help.
Back to top
View user's profile Send private message
Acronis
n00b
n00b


Joined: 09 Jun 2005
Posts: 46

PostPosted: Tue Mar 25, 2008 9:12 am    Post subject: Reply with quote

I have the same problem. Is there any solution for this problem?
Back to top
View user's profile Send private message
schachti
Advocate
Advocate


Joined: 28 Jul 2003
Posts: 3765
Location: Gifhorn, Germany

PostPosted: Tue Mar 25, 2008 10:07 am    Post subject: Reply with quote

Did you enable CONFIG_GRKERNSEC_TPE? I think TPE is causing your problem...
_________________
Never argue with an idiot. He brings you down to his level, then beats you with experience.

How-To: Daten verschlüsselt auf DVD speichern.
Back to top
View user's profile Send private message
Acronis
n00b
n00b


Joined: 09 Jun 2005
Posts: 46

PostPosted: Wed Mar 26, 2008 11:12 am    Post subject: Reply with quote

yes

I have the following settings

kernel.grsecurity.tpe = 1
kernel.grsecurity.tpe_gid = 1234

What should I do now?

The user must have the same gid as the TPE gid?
Back to top
View user's profile Send private message
schachti
Advocate
Advocate


Joined: 28 Jul 2003
Posts: 3765
Location: Gifhorn, Germany

PostPosted: Wed Mar 26, 2008 11:39 am    Post subject: Reply with quote

It depends on whether CONFIG_GRKERNSEC_TPE_ALL and/or CONFIG_GRKERNSEC_TPE_INVERT are set.
_________________
Never argue with an idiot. He brings you down to his level, then beats you with experience.

How-To: Daten verschlüsselt auf DVD speichern.
Back to top
View user's profile Send private message
Acronis
n00b
n00b


Joined: 09 Jun 2005
Posts: 46

PostPosted: Wed Mar 26, 2008 1:43 pm    Post subject: Reply with quote

/boot/config:CONFIG_GRKERNSEC_TPE_INVERT=y
/boot/config:CONFIG_GRKERNSEC_TPE_ALL=y

hmm
Back to top
View user's profile Send private message
schachti
Advocate
Advocate


Joined: 28 Jul 2003
Posts: 3765
Location: Gifhorn, Germany

PostPosted: Wed Mar 26, 2008 2:01 pm    Post subject: Reply with quote

Acronis wrote:
/boot/config:CONFIG_GRKERNSEC_TPE_INVERT=y
/boot/config:CONFIG_GRKERNSEC_TPE_ALL=y


In this case, your user has to be a member of the group given by the option CONFIG_GRKERNSEC_TPE_GID (1234 in your case?). This is well explained in the help text in the kernel config. :wink:
_________________
Never argue with an idiot. He brings you down to his level, then beats you with experience.

How-To: Daten verschlüsselt auf DVD speichern.
Back to top
View user's profile Send private message
Acronis
n00b
n00b


Joined: 09 Jun 2005
Posts: 46

PostPosted: Thu Mar 27, 2008 3:31 pm    Post subject: Reply with quote

/etc/group
testgroup:x:1234:testuser

I have add the user testuser into the group testgroup but it doesn't work.
Back to top
View user's profile Send private message
mikb
Tux's lil' helper
Tux's lil' helper


Joined: 14 Dec 2005
Posts: 124
Location: Sydney Australia

PostPosted: Tue Jun 03, 2008 7:08 am    Post subject: Reply with quote

Acronis wrote:
/etc/group
testgroup:x:1234:testuser

I have add the user testuser into the group testgroup but it doesn't work.


Didn't work for me either - I had to use sysctl to change kernel.grsecurity.tpe to 0.

Then my personal scripts worked.

Someone else described this as "well explained". I don't think so. Well explained would include documentation on tuning it to allow fairly normal things - like personal scripts.
_________________
With sufficient thrust, pigs fly just fine (RFC 1925, apparently talking about Gentoo)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum