Default ‘DENY’ behaviour

AppCL LSM now includes the option for blacklisting/whitelisting default behaviour. This being the default action taken for applications not labelled on an inode. Attributes are set in the following format:

/path/to/app:perm;

Multiple entries can be specified in the same format:

/path/to/app:perm;/path/to/app:perm;

By default any application not present on an inode label is unaffected and its action allowed (blacklisting). AppCL now allows a default DENY behaviour to deny all actions from any application that is not labelled (whitelisting). To enable this behaviour, add an entry to the label in the following format (may be combined with multiple entries):

/path/to/app:perm;deny:;

The make_appcl_entry() function now checks for the ‘deny’ attribute, labelling the inodes default behaviour flag as required. This is shown in Figure 1.0.

Figure 1.0 – make_appcl_entry() deny attribute check

Screen Shot 2016-03-18 at 21.24.49

The permission check functions ‘appcl_specific_perm_check()’ and ‘appcl_mask_perm_check()’ check the default behaviour flag if the inode has permission entries but not for the current application. This is shown in Figure 2.0.

Figure 2.0 – Check default behaviour flag in permission functions

Screen Shot 2016-03-18 at 21.24.16

Example:

The following example will grant the application ‘less’ the permissions ‘read’. The default DENY behaviour is also invoked causing all other actions to be denied.

/bin/less:r;deny:;

To set this as an attribute the ‘setfattr’ utility can be used. The above example would take the following format to be set on a file named ‘test’.

setfattr -n security.appcl -v “/bin/less:r;deny:;” test

The inode security label is then populated from the extended attribute value and the appropriate permissions are enforced.


To view the public git for this project visit:

https://github.com/jamesbjohnson/appcl-lsm-public

Continue to see the development blog page for updates regarding the project progress/development blog.

2 thoughts on “Default ‘DENY’ behaviour

  1. […] (–dir option). Knowledge of the AppCL LSM attribute format (as discussed in the post ‘Default ‘DENY’ behaviour‘), nor the pathname of an application is required. Figure 1.0 shows build mode against a file […]

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s