Skip to contentSkip to conversation

memory_device_t

DISCUSSION Justin Mattock 2 participants 5 messages Apr 17, 2008 SELinux security module

lore
Share & tools
lore
#0 lore raw

Hello; I have a quick question. When using a macbook pro there is a tool(radeontool) that I use to lower the gpu power to a low state causing significant cooling of the system hardware. The problem I run into is I'm receiving a: libsepol.check_assertion_helper: assertion on line 9293 violated by allow sysadm_t memory_device_t:chr_file { read write };
Whenever trying to write the allow rule into the policy. What would be the best step to allow this tool?
Also I noticed when trying to run VirtualBox there seems to be a missing audit message that is important for the application to start. Keep in mind this was about 3 weeks ago, with the latest svn refpolicy at the time, so the problem might already have be taken care of. Other than that, with the latest refpolicy and kernel(git) everything seem to be running quite smoothly.
regards;

Signature · 6 lines
Justin P. Mattock

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#1 lore raw
Quoted 8 lines · Justin Mattock

Hello; I have a quick question. When using a macbook pro there is a tool(radeontool) that I use to lower the gpu power to a low state causing significant cooling of the system hardware. The problem I run into is I'm receiving a: libsepol.check_assertion_helper: assertion on line 9293 violated by allow sysadm_t memory_device_t:chr_file { read write };
Whenever trying to write the allow rule into the policy. What would be the best step to allow this tool?

Well, assuming that it actually requires that access, you can override the assertion / neverallow rule by using the proper policy interface instead of a direct allow rule. audit2allow -R will try to match and use interface calls for you, or you can look them up and use the right one manually. dev_read_raw_memory() and dev_write_raw_memory() appear to be the ones in question.

Or you can disable assertion checking by putting expand-check=0 in /etc/selinux/semanage.conf.

Signature · 8 lines
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#2 lore raw
Quoted 10 lines · Stephen Smalley
Quoted 8 lines · Justin Mattock

Hello; I have a quick question. When using a macbook pro there is a tool(radeontool) that I use to lower the gpu power to a low state causing significant cooling of the system hardware. The problem I run into is I'm receiving a: libsepol.check_assertion_helper: assertion on line 9293 violated by allow sysadm_t memory_device_t:chr_file { read write };
Whenever trying to write the allow rule into the policy. What would be the best step to allow this tool?

Quoted 6 lines

Well, assuming that it actually requires that access, you can override the assertion / neverallow rule by using the proper policy interface instead of a direct allow rule. audit2allow -R will try to match and use interface calls for you, or you can look them up and use the right one manually. dev_read_raw_memory() and dev_write_raw_memory() appear to be the ones in question.

Oh, but I see that you showed the denial as being on sysadm_t. You should really define a separate domain for the tool and only allow it for that domain rather than directly allowing it to sysadm_t.

Quoted 4 lines

Or you can disable assertion checking by putting expand-check=0 in /etc/selinux/semanage.conf.

Signature · 8 lines
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#3 lore raw
Quoted 12 lines · Stephen Smalley
Quoted 10 lines · Stephen Smalley
Quoted 8 lines · Justin Mattock

Hello; I have a quick question. When using a macbook pro there is a tool(radeontool) that I use to lower the gpu power to a low state causing significant cooling of the system hardware. The problem I run into is I'm receiving a: libsepol.check_assertion_helper: assertion on line 9293 violated by allow sysadm_t memory_device_t:chr_file { read write };
Whenever trying to write the allow rule into the policy. What would be the best step to allow this tool?

Quoted 6 lines
Quoted 6 lines

Well, assuming that it actually requires that access, you can override the assertion / neverallow rule by using the proper policy interface instead of a direct allow rule. audit2allow -R will try to match and use interface calls for you, or you can look them up and use the right one manually. dev_read_raw_memory() and dev_write_raw_memory() appear to be the ones in question.

With refpolicy where would I put that info from audit2allow -R?

Quoted 4 lines

Oh, but I see that you showed the denial as being on sysadm_t. You should really define a separate domain for the tool and only allow it for that domain rather than directly allowing it to sysadm_t.

First I'll try another domain, then look into the other options,

Quoted 11 lines
Quoted 6 lines

Or you can disable assertion checking by putting expand-check=0 in /etc/selinux/semanage.conf.

--
Stephen Smalley
National Security Agency

Thanks for the help, also a few weeks ago giving me the info on echo 0

Quoted 1 line

/proc/sys/kernel/printk_ratelimit

made writting the rules more enjoyable, rather than spending hours.

Signature · 6 lines
Justin P. Mattock

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#4 lore raw
Quoted 44 lines · Justin Mattock
Quoted 12 lines · Stephen Smalley
Quoted 10 lines · Stephen Smalley
Quoted 8 lines · Justin Mattock

Hello; I have a quick question. When using a macbook pro there is a tool(radeontool) that I use to lower the gpu power to a low state causing significant cooling of the system hardware. The problem I run into is I'm receiving a: libsepol.check_assertion_helper: assertion on line 9293 violated by allow sysadm_t memory_device_t:chr_file { read write };
Whenever trying to write the allow rule into the policy. What would be the best step to allow this tool?

Quoted 6 lines
Quoted 6 lines

Well, assuming that it actually requires that access, you can override the assertion / neverallow rule by using the proper policy interface instead of a direct allow rule. audit2allow -R will try to match and use interface calls for you, or you can look them up and use the right one manually. dev_read_raw_memory() and dev_write_raw_memory() appear to be the ones in question.

With refpolicy where would I put that info from audit2allow -R?

Quoted 4 lines

Oh, but I see that you showed the denial as being on sysadm_t. You should really define a separate domain for the tool and only allow it for that domain rather than directly allowing it to sysadm_t.

First I'll try another domain, then look into the other options,

Quoted 11 lines
Quoted 6 lines

Or you can disable assertion checking by putting expand-check=0 in /etc/selinux/semanage.conf.

--
Stephen Smalley
National Security Agency

Quoted 7 lines

Thanks for the help, also a few weeks ago giving me the info on echo 0

Quoted 1 line

/proc/sys/kernel/printk_ratelimit

made writting the rules more enjoyable, rather than spending hours.

--
Justin P. Mattock

O.K. doing what you said worked by putting that tool in a different domain, having this tool used early in the boot process i.g. putting the tool in /usr/sbin, then adding a line to rc.local is working, not producing any denials, but it is working.
Does this seem correct to you?

Justin P. Mattock

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.