ali valizadeh | 15 Aug 2011 21:10
Picon
Favicon

Boot Role

Hello all,

I have compiled RSBAC kernel with RC and AUTH modules enabled. I could set AUTH policy to boot system with it
(RC is in softmode). However I couldn't boot system with RC. I have checked that at boot time /sbin/init
contains the Boot Role (999999) as initial_role but the system couldn't boot with the role. There are many
"NOT_GRANTED by RC" in processes such as dbus-daemon, avahi-daemon, hal-daemon and others. If init
process is the parent of other processes, and RSBAC system support inheritance, why the other processes
can't get Boot Role (in my test the role of other processes is General user (0) and I expect it to be Boot Role!)?

Please help me to boot system with the Boot Role (999999). Thanks in advance for your help.

Regards,
Ali
Picon

Re: Boot Role

If the message is exactly this (NOT GRANTED by RC), RC is not in softmode,
secure mode instead (in global softmode you would see NOT GRANTED (softmode)
by RC. Add boot parameter rsbac_softmode/ rsbac_softmode_rc to your
grub/lilo to switch in softmode.

I don't remember default values of init, but you could check the default
values of the binaries and the /sbin/init it self together with the boot
role parameters definition to check what's up, the reason of the change you
will found in there.

This is at this way because security concerns, nobody (no daemons, no initrd
scripts etc) should run with boot role, maybe you should create their own
roles to this binaries and make them running under them isolating all you
can.

By default in RC there is inheritance in until a setuid or exec is done if
it's happened then could exist triggers to change the new rol. Check above.

 You should check this too, take a look:
http://www.rsbac.org/documentation/rsbac_handbook/

Furthermore you should add some more information, as which distribution do
you use, version of rsbac and things like this because between others this
parameters by default may change between versions.

2011/8/15 ali valizadeh <valizadeh82 <at> yahoo.com>

> Hello all,
>
> I have compiled RSBAC kernel with RC and AUTH modules enabled. I could set
(Continue reading)

Jens Kasten | 15 Aug 2011 23:25
Picon

Re: Boot Role

Hi Ali,

your info about RC looks that is not running in softmode.
Only boot a kernel with softmode enabled in the configuration not
automatic boot in softmode.
There is a kernel boot paramter rsbac_softmode.
If you already set it then maybe check the kernel configuration for
rsbac twice. 
More information about which kernel- and rsbac version would helpfull
but not lead automatic to success in this case ;)

In my case i would avoid to use the Boot Role and General Role for all
services.

Grüße
Jens

Am Montag, den 15.08.2011, 12:10 -0700 schrieb ali valizadeh:
> Hello all,
> 
> I have compiled RSBAC kernel with RC and AUTH modules enabled. I could set AUTH policy to boot system with it
(RC is in softmode). However I couldn't boot system with RC. I have checked that at boot time /sbin/init
contains the Boot Role (999999) as initial_role but the system couldn't boot with the role. There are many
"NOT_GRANTED by RC" in processes such as dbus-daemon, avahi-daemon, hal-daemon and others. If init
process is the parent of other processes, and RSBAC system support inheritance, why the other processes
can't get Boot Role (in my test the role of other processes is General user (0) and I expect it to be Boot Role!)?
> 
> Please help me to boot system with the Boot Role (999999). Thanks in advance for your help.
> 
> 
(Continue reading)

Picon

Re: Boot Role

I think it's the key of this question because if I'm not wrong inherited
mixed proc/user parameter is not the switch by default now.

2011/8/15 Jens Kasten <jens <at> kasten-edv.de>

>
> More information about which kernel- and rsbac version would helpfull
> but not lead automatic to success in this case ;)
>
> In my case i would avoid to use the Boot Role and General Role for all
> services.
>
> Grüße
> Jens
>
>
> Am Montag, den 15.08.2011, 12:10 -0700 schrieb ali valizadeh:
> > Hello all,
> >
> > I have compiled RSBAC kernel with RC and AUTH modules enabled. I could
> set AUTH policy to boot system with it (RC is in softmode). However I
> couldn't boot system with RC. I have checked that at boot time /sbin/init
> contains the Boot Role (999999) as initial_role but the system couldn't boot
> with the role. There are many "NOT_GRANTED by RC" in processes such as
> dbus-daemon, avahi-daemon, hal-daemon and others. If init process is the
> parent of other processes, and RSBAC system support inheritance, why the
> other processes can't get Boot Role (in my test the role of other processes
> is General user (0) and I expect it to be Boot Role!)?
> >
> > Please help me to boot system with the Boot Role (999999). Thanks in
(Continue reading)

Gergely Lónyai | 16 Aug 2011 18:54
Gravatar

kernel-3.0.y

Hi

The Mandriva 20011 is RSBAC ready now. I submit the kernel-rsbac-3.0.1
and will maintain all the Mandriva 2011 lifetime.

1. Install Mandriva 2011 (now Mandriva 2011 RC2)
2. open a konsole and run "urpmi rsbac"
3.
http://www.rsbac.org/documentation/rsbac_handbook/installation/first_boot

Gergely Lonyai, Aleph
ali valizadeh | 16 Aug 2011 22:09
Picon
Favicon

Re: Boot Role (RC module)


Hi everyone,

I have installed the rsbac 1.4.3 version on Fedora 12 (kernel version 2.6.32-8). In my compilation AUTH and
RC is enabled.

Yes, I boot system with rsbac_softmode to configure the system at first boot. I could set policy for AUTH to
remove the "NOT_GRANTED by AUTH (softmode)" but I couldn't set correct policy for RC to remove
"NOT_GRANTED by RC (softmode)" messages.
I want to set policy for RC module in softmode then I want to boot system in enforcement mode without the
softmode parameter.
Please help me to use boot role or other roles (if boot role is insecure) to boot system in enforcement mode.
Please help me how to set roles (initial or force roles) for init, dbus-daemon, avahi-daemon, hal-daemon
and other processes to boot system correctly.

Many thanks to all.

Regards,
Ali

________________________________
From: "rsbac-request <at> rsbac.org" <rsbac-request <at> rsbac.org>
To: rsbac <at> rsbac.org
Sent: Tuesday, August 16, 2011 9:31 PM
Subject: rsbac Digest, Vol 61, Issue 1

>Hello all,

>I have compiled RSBAC kernel with RC and AUTH modules enabled. I could set AUTH policy to boot system with it
(RC is in >softmode). However I couldn't boot system with RC. I have checked that at boot time /sbin/init
(Continue reading)

Jens Kasten | 16 Aug 2011 22:43
Picon

Re: Boot Role (RC module)

You could visit this site:
http://www.rsbac.org/wiki/experiences/igraltist/rc

This is my try to start RSBAC RC setup.
The wiki is not complete and have to update.

Here also older wiki which described how to setup RC Roles
http://www.rsbac.org/wiki/experiences/telmich

And this:
http://www.rsbac.org/wiki/experiences/tweety#howto_protect_kernel_code_against_tampering

Am Dienstag, den 16.08.2011, 13:09 -0700 schrieb ali valizadeh:
> 
> Hi everyone,
> 
> I have installed the rsbac 1.4.3 version on Fedora 12 (kernel version 2.6.32-8). In my compilation AUTH
and RC is enabled.
> 
> Yes, I boot system with rsbac_softmode to configure the system at first boot. I could set policy for AUTH to
remove the "NOT_GRANTED by AUTH (softmode)" but I couldn't set correct policy for RC to remove
"NOT_GRANTED by RC (softmode)" messages.
> I want to set policy for RC module in softmode then I want to boot system in enforcement mode without the
softmode parameter.
> Please help me to use boot role or other roles (if boot role is insecure) to boot system in enforcement mode.
Please help me how to set roles (initial or force roles) for init, dbus-daemon, avahi-daemon, hal-daemon
and other processes to boot system correctly.
> 
> Many thanks to all.
> 
(Continue reading)

Picon

Re: Boot Role (RC module)

I would do this (it's a beginning):

First you shall (always with an "at least") identify persistent binaries in
your system (those that when you do a "top" are always in memory and
waiting, second, I would create at least new roles for this persistents
binaries (from rsbac_menu you can access rc setup).

It's a good idea that this programs (at least) get their own
type_fd_creation/socket, fd_type, ipc_type creation, and process creation
type after execution.

After that, I would create enough fd_types for filesystem targets (for
example to /boot their own type) and assign to it. As suggestion assign
their own fd_type to binaries with minimum Capabilities (if you use CAP) and
with their own running role.

Change in rsbac_fd_menu initial_rol to the binary own role and in force_rol
set mixed inherit user/proc one. With this you can do things like this that
follows:

sshd execution, with their own role set under initial role, when sshd drops
privs changing from 0 (root) to 22 (user "sshd"), it uses value from
rc_force role, as it's is set in "mixed user/proc",  after chown (0-->22)
rc_def_role from user 22 is taken getting unprivilege created role to sshd.

A lot of binaries work at this way (tipically those that appears in
/etc/passwd).

When everything is set without softmode add parameter rsbac_rc_learn to boot
parameters every role will learn everithing they need.
(Continue reading)

Amon Ott | 17 Aug 2011 08:22

Re: kernel-3.0.y

Hi Aleph!

On Tuesday 16 August 2011 wrote Gergely Lónyai:
> The Mandriva 20011 is RSBAC ready now. I submit the kernel-rsbac-3.0.1
> and will maintain all the Mandriva 2011 lifetime.
>
> 1. Install Mandriva 2011 (now Mandriva 2011 RC2)
> 2. open a konsole and run "urpmi rsbac"
> 3.
> http://www.rsbac.org/documentation/rsbac_handbook/installation/first_boot

This is good news indeed! Thank you very much!

Amon.
--

-- 
http://www.rsbac.org - GnuPG: 2048g/5DEAAA30 2002-10-22
Gergely Lónyai | 18 Aug 2011 13:04
Gravatar

3.0.3 net/ipv4/route.o compile error


  CC      net/ipv4/route.o
  CC [M]  drivers/i2c/busses/i2c-intel-mid.o
net/ipv4/route.c:115:1: error: expected identifier or '(' before '<<'
token
net/ipv4/route.c: In function 'rt_garbage_collect':
net/ipv4/route.c:903:16: error: 'ip_rt_max_size' undeclared (first use
in this function)
net/ipv4/route.c:903:16: note: each undeclared identifier is reported
only once for each function it appears in
  CC [M]  fs/reiserfs/namei.o
net/ipv4/route.c: At top level:
net/ipv4/route.c:3085:13: error: 'ip_rt_max_size' undeclared here (not
in a function)
net/ipv4/route.c: In function 'ip_rt_init':
net/ipv4/route.c:3325:2: warning: statement with no effect
[-Wunused-value]
net/ipv4/route.c:3334:2: warning: passing argument 1 of 'xfrm4_init'
makes integer from pointer without a cast [enabled by default]
include/net/xfrm.h:1336:13: note: expected 'int' but argument is of type
'struct ctl_table *'
make[2]: *** [net/ipv4/route.o] Error 1
make[1]: *** [net/ipv4] Error 2
make: *** [net] Error 2
make: *** Waiting for unfinished jobs....

Gmane