logging question
I have a debian unstable machine I'm trying to get selinux to work on. I've gotten a policy to build, installed the userland tools, loaded it, etc. It's working, because I can swithc into enforcing mode, and things break (presumably due to my havng screwed up the policy). But I never sdeem to get any logging messages of what was denied and why (In or out of enforcing mode). What's the best way for me to get the kernel to log the appropriate messages somewhere?
Thanks.
Signature · 6 lines
Eric -- 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.
Quoted 7 lines · Eric Moore
I have a debian unstable machine I'm trying to get selinux to work on. I've gotten a policy to build, installed the userland tools, loaded it, etc. It's working, because I can swithc into enforcing mode, and things break (presumably due to my havng screwed up the policy). But I never sdeem to get any logging messages of what was denied and why (In or out of enforcing mode). What's the best way for me to get the kernel to log the appropriate messages somewhere?
In 2.6, SELinux was converted over to using the native kernel audit subsystem for logging its denials. So:
- Does your kernel have auditing enabled (CONFIG_AUDIT=y)? If not, time to rebuild your kernel.
- Are you running auditd? If so, look in /var/log/audit/audit.log or wherever /etc/auditd.conf directs audit messages. If not, look in /var/log/messages or wherever /etc/syslog.conf directs kern.warn messages.
- If you still don't have anything logged in either location, run 'make clean enableaudit load' in your policy directory to clear all "dontaudit" rules from the loaded policy so that no log messages are suppressed (normally, certain denials are silently denied to avoid filling your logs with noise from known probing by library and applications that is common but not needed for operation). Then do a 'make clean load' later to re-include those dontaudit rules after you've collected your log messages.
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.
Quoted 7 lines · Stephen Smalley
Quoted 2 lines
(In or out of enforcing mode). What's the best way for me to get the kernel to log the appropriate messages somewhere?
In 2.6, SELinux was converted over to using the native kernel audit subsystem for logging its denials. So:
- Does your kernel have auditing enabled (CONFIG_AUDIT=y)? If not, time to rebuild your kernel.
The Debian kernel binary packages are built with SE Linux enabled but auditing disabled. I have sent several messages to the relevant people about this matter and had no positive response. Several 2.6.x kernels have been released in this state.
Quoted 4 lines
- Are you running auditd? If so, look in
/var/log/audit/audit.logor wherever/etc/auditd.confdirects audit messages. If not, look in/var/log/messagesor wherever/etc/syslog.confdirects kern.warn messages.
auditd is not yet packaged for Debian. The first person to volunteer gave up because it was too difficult. I gave it a go but found that the kernel headers packaged with Debian did not support the interfaces needed by auditd (this was my impression at the time and I'm going from memory - this statement may not be entirely correct). When I get back from AUUG2005 I'll give it another go.
Incidentally being able to build from the standard headers is a requirement for Debian. All Debian packages get automatically built for architectures other than the one used for the initial build, so the headers in question need to be installed in all build machines. I could hack the compile process for i386 but not for all the rest (I tried it before in the old-selinux days and it wasn't fun).
Signature · 9 lines
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark http://www.coker.com.au/postal/ Postal SMTP/POP benchmark http://www.coker.com.au/~russell/ My home page -- 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.
raising a bug request with the debian guys, hope you don't mind me taking the liberty, russell...
Quoted 43 lines · Russell Coker
Quoted 7 lines · Stephen Smalley
Quoted 2 lines
(In or out of enforcing mode). What's the best way for me to get the kernel to log the appropriate messages somewhere?
In 2.6, SELinux was converted over to using the native kernel audit subsystem for logging its denials. So:
- Does your kernel have auditing enabled (CONFIG_AUDIT=y)? If not, time to rebuild your kernel.The Debian kernel binary packages are built with SE Linux enabled but auditing disabled. I have sent several messages to the relevant people about this matter and had no positive response. Several 2.6.x kernels have been released in this state.
Quoted 4 lines
- Are you running auditd? If so, look in
/var/log/audit/audit.logor wherever/etc/auditd.confdirects audit messages. If not, look in/var/log/messagesor wherever/etc/syslog.confdirects kern.warn messages.auditd is not yet packaged for Debian. The first person to volunteer gave up because it was too difficult. I gave it a go but found that the kernel headers packaged with Debian did not support the interfaces needed by auditd (this was my impression at the time and I'm going from memory - this statement may not be entirely correct). When I get back from AUUG2005 I'll give it another go.
Incidentally being able to build from the standard headers is a requirement for Debian. All Debian packages get automatically built for architectures other than the one used for the initial build, so the headers in question need to be installed in all build machines. I could hack the compile process for i386 but not for all the rest (I tried it before in the old-selinux days and it wasn't fun).
Signature · 9 lines
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark http://www.coker.com.au/postal/ Postal SMTP/POP benchmark http://www.coker.com.au/~russell/ My home page -- 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.
Signature · 8 lines
-- <a href="http://lkcl.net">http://lkcl.net</a> -- -- 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.
Quoted 9 lines · Russell Coker
Quoted 7 lines · Stephen Smalley
Quoted 2 lines
(In or out of enforcing mode). What's the best way for me to get the kernel to log the appropriate messages somewhere?
In 2.6, SELinux was converted over to using the native kernel audit subsystem for logging its denials. So:
- Does your kernel have auditing enabled (CONFIG_AUDIT=y)? If not, time to rebuild your kernel.
Quoted 4 lines
The Debian kernel binary packages are built with SE Linux enabled but auditing disabled. I have sent several messages to the relevant people about this matter and had no positive response. Several 2.6.x kernels have been released in this state.
They may be concerned about the performance overhead of the audit infrastructure, but most of that is from CONFIG_AUDIT_SYSCALL=y, not just CONFIG_AUDIT=y, and SELinux only requires the latter to perform basic auditing of permission denials (the former can be useful in getting more information about the syscalls and is needed by auditd, but not strictly by SELinux).
Other option is to make the #undef CONFIG_AUDIT case revert to using printks like the original SELinux code.
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.
Quoted 9 lines · Stephen Smalley
They may be concerned about the performance overhead of the audit infrastructure, but most of that is from
CONFIG_AUDIT_SYSCALL=y, not justCONFIG_AUDIT=y, and SELinux only requires the latter to perform basic auditing of permission denials (the former can be useful in getting more information about the syscalls and is needed by auditd, but not strictly by SELinux).Other option is to make the #undef
CONFIG_AUDITcase revert to using printks like the original SELinux code.
Of course doing that would either give very poor information on the action that caused the AVC message or require some kernel coding work to deliver a moderate amount of information (what we used to get before the audit code was used), and certainly nothing like the amount of information that we get now that SE Linux uses the audit framework.
Signature · 9 lines
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark http://www.coker.com.au/postal/ Postal SMTP/POP benchmark http://www.coker.com.au/~russell/ My home page -- 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.
Quoted 4 lines · Russell Coker
The Debian kernel binary packages are built with SE Linux enabled but auditing disabled. I have sent several messages to the relevant people about this matter and had no positive response. Several 2.6.x kernels have been released in this state.
The latest 2.6.14 kernels have CONFIG_AUDIT=y, as well as
CONFIG_AUDITSYSCALL=y
Is a new release of libsepol imminent, or should I go fetch
the 1.9.X release from CVS and upload that to Debian?
manoj
ps: Sorry for being tardy on the Debian SELinux front, but I am just coming out of a health issue, and had been unable to spend time on SELINUX
Signature · 8 lines
Time is an illusion perpetrated by the manufacturers of space. Manoj Srivastava <[email protected]> <[email protected]> 1024D/BF24424C print 4966 F272 D093 B493 410B 924B 21BA DABB BF24 424C -- 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.
hiya manoj,
was wondering where you got to. someone on the debian kernel team contacted me last month, wondering who the debian / selinux point of contact was.
do you know the people to speak to such that a debian-selinux mailing list can be set up because that's the "natural" place people would expect to look for ... and it don't exist.
l.
Quoted 25 lines · Manoj Srivastava
Quoted 4 lines · Russell Coker
The Debian kernel binary packages are built with SE Linux enabled but auditing disabled. I have sent several messages to the relevant people about this matter and had no positive response. Several 2.6.x kernels have been released in this state.
The latest 2.6.14 kernels have
CONFIG_AUDIT=y, as well as
CONFIG_AUDITSYSCALL=yIs a new release of libsepol imminent, or should I go fetch
the 1.9.X release from CVS and upload that to Debian?manoj
ps: Sorry for being tardy on the Debian SELinux front, but I am just coming out of a health issue, and had been unable to spend time on SELINUXSignature · 8 lines
Time is an illusion perpetrated by the manufacturers of space. Manoj Srivastava <[email protected]> <[email protected]> 1024D/BF24424C print 4966 F272 D093 B493 410B 924B 21BA DABB BF24 424C -- 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.
Signature · 8 lines
-- <a href="http://lkcl.net">http://lkcl.net</a> -- -- 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.
Quoted 2 lines · Manoj Srivastava
ps: Sorry for being tardy on the Debian SELinux front, but I am just coming out of a health issue, and had been unable to spend time on SELINUX
Manoj, glad to hear you are feeling better. I spent some time about a month ago trying to get Debian selinux running on a test system but had to give up for the time being when my window of unallocated time ran out.
I have two projects coming up on which I would love to be able to deploy SELinux, but I would have to do it on Sarge dists since these will be real life critical services. I hope to get back to testing Debian SELinux in the coming month and I am sure your assistance will be invaluable.
Signature · 8 lines
------------------------------------------------------
Artemis Systems Development
Dale Amon [email protected] +44-7802-188325
International linux systems consultancy
Hardware & software system design, security
and networking, systems programming and Admin
"Have Laptop, Will Travel"
------------------------------------------------------