* logging question
@ 2005-10-17 16:26 Eric Moore
2005-10-17 16:39 ` Stephen Smalley
0 siblings, 1 reply; 17+ messages in thread
From: Eric Moore @ 2005-10-17 16:26 UTC (permalink / raw)
To: SELinux
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.
--
Eric
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: logging question
2005-10-17 16:26 logging question Eric Moore
@ 2005-10-17 16:39 ` Stephen Smalley
2005-10-17 21:52 ` Russell Coker
0 siblings, 1 reply; 17+ messages in thread
From: Stephen Smalley @ 2005-10-17 16:39 UTC (permalink / raw)
To: Eric Moore; +Cc: Russell Coker, SELinux
On Mon, 2005-10-17 at 12:26 -0400, Eric Moore wrote:
> 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.
--
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 majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: logging question
2005-10-17 16:39 ` Stephen Smalley
@ 2005-10-17 21:52 ` Russell Coker
2005-10-17 22:19 ` Luke Kenneth Casson Leighton
` (2 more replies)
0 siblings, 3 replies; 17+ messages in thread
From: Russell Coker @ 2005-10-17 21:52 UTC (permalink / raw)
To: Stephen Smalley; +Cc: Eric Moore, SELinux
On Tuesday 18 October 2005 02:39, Stephen Smalley <sds@tycho.nsa.gov> wrote:
> > (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.
> - 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.
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).
--
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 majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: logging question
2005-10-17 21:52 ` Russell Coker
@ 2005-10-17 22:19 ` Luke Kenneth Casson Leighton
2005-10-18 11:56 ` Stephen Smalley
2005-10-29 16:00 ` Manoj Srivastava
2 siblings, 0 replies; 17+ messages in thread
From: Luke Kenneth Casson Leighton @ 2005-10-17 22:19 UTC (permalink / raw)
To: Russell Coker; +Cc: Stephen Smalley, Eric Moore, SELinux
raising a bug request with the debian guys, hope you don't mind me
taking the liberty, russell...
On Tue, Oct 18, 2005 at 07:52:25AM +1000, Russell Coker wrote:
> On Tuesday 18 October 2005 02:39, Stephen Smalley <sds@tycho.nsa.gov> wrote:
> > > (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.
>
> > - 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.
>
> 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).
>
> --
> 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 majordomo@tycho.nsa.gov with
> the words "unsubscribe selinux" without quotes as the message.
--
--
<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 majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: logging question
2005-10-17 21:52 ` Russell Coker
2005-10-17 22:19 ` Luke Kenneth Casson Leighton
@ 2005-10-18 11:56 ` Stephen Smalley
2005-10-18 22:21 ` Russell Coker
2005-10-29 16:00 ` Manoj Srivastava
2 siblings, 1 reply; 17+ messages in thread
From: Stephen Smalley @ 2005-10-18 11:56 UTC (permalink / raw)
To: russell; +Cc: Eric Moore, SELinux
On Tue, 2005-10-18 at 07:52 +1000, Russell Coker wrote:
> On Tuesday 18 October 2005 02:39, Stephen Smalley <sds@tycho.nsa.gov> wrote:
> > > (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.
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.
--
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 majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: logging question
2005-10-18 11:56 ` Stephen Smalley
@ 2005-10-18 22:21 ` Russell Coker
0 siblings, 0 replies; 17+ messages in thread
From: Russell Coker @ 2005-10-18 22:21 UTC (permalink / raw)
To: Stephen Smalley; +Cc: Eric Moore, SELinux
On Tuesday 18 October 2005 21:56, Stephen Smalley <sds@tycho.nsa.gov> wrote:
> 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.
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.
--
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 majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: logging question
2005-10-17 21:52 ` Russell Coker
2005-10-17 22:19 ` Luke Kenneth Casson Leighton
2005-10-18 11:56 ` Stephen Smalley
@ 2005-10-29 16:00 ` Manoj Srivastava
2005-10-29 16:50 ` Luke Kenneth Casson Leighton
2005-10-30 12:49 ` Dale Amon
2 siblings, 2 replies; 17+ messages in thread
From: Manoj Srivastava @ 2005-10-29 16:00 UTC (permalink / raw)
To: selinux
On Tue, 18 Oct 2005 07:52:25 +1000, Russell Coker <russell@coker.com.au> said:
> 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
--
Time is an illusion perpetrated by the manufacturers of space.
Manoj Srivastava <manoj.srivastava@stdc.com> <srivasta@acm.org>
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 majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: logging question
2005-10-29 16:00 ` Manoj Srivastava
@ 2005-10-29 16:50 ` Luke Kenneth Casson Leighton
2005-10-30 12:49 ` Dale Amon
1 sibling, 0 replies; 17+ messages in thread
From: Luke Kenneth Casson Leighton @ 2005-10-29 16:50 UTC (permalink / raw)
To: Manoj Srivastava; +Cc: selinux
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.
On Sat, Oct 29, 2005 at 11:00:24AM -0500, Manoj Srivastava wrote:
> On Tue, 18 Oct 2005 07:52:25 +1000, Russell Coker <russell@coker.com.au> said:
>
> > 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
> --
> Time is an illusion perpetrated by the manufacturers of space.
> Manoj Srivastava <manoj.srivastava@stdc.com> <srivasta@acm.org>
> 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 majordomo@tycho.nsa.gov with
> the words "unsubscribe selinux" without quotes as the message.
--
--
<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 majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: logging question
2005-10-29 16:00 ` Manoj Srivastava
2005-10-29 16:50 ` Luke Kenneth Casson Leighton
@ 2005-10-30 12:49 ` Dale Amon
1 sibling, 0 replies; 17+ messages in thread
From: Dale Amon @ 2005-10-30 12:49 UTC (permalink / raw)
To: Manoj Srivastava; +Cc: selinux
[-- Attachment #1: Type: text/plain, Size: 1137 bytes --]
On Sat, Oct 29, 2005 at 11:00:24AM -0500, Manoj Srivastava wrote:
> 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.
--
------------------------------------------------------
Artemis Systems Development
Dale Amon amon@islandone.org +44-7802-188325
International linux systems consultancy
Hardware & software system design, security
and networking, systems programming and Admin
"Have Laptop, Will Travel"
------------------------------------------------------
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Logging question
@ 2005-02-09 14:08 dave beach
[not found] ` <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAqrTb2LYes02Oflamihm4w8 KAAAAQAAAA2SDxWNDfuEmRY16FU7zNcwEAAAAA@rogers.com>
0 siblings, 1 reply; 17+ messages in thread
From: dave beach @ 2005-02-09 14:08 UTC (permalink / raw)
To: netfilter
Hi, I have been using iptables for quite some time now but only recently
have decided to do things a bit differently. I'm trying to ulog various
things, and am having an unexpected problem ulogging packets outbound on
eth0 (the external interface). I don't have a problem constructing the rule,
just in figuring out in which table/chain to place it.
I'm clearly still not fully understanding table/chain traversal. It was my
understanding that every outbound packet, no matter where its origin or
destination, would pass through the nat/POSTROUTING chain, so this is where
my ulog rule came in to try and log all outbound packets. After seeing this
wasn't working (at all, although a similar rule to ulog all packets outbound
on eth1 (the internal interface) placed right after it seems to work like a
charm), I noticed in Oskar's excellent tutorial the statement that some
packets may not in fact pass through nat/POSTROUTING at all.
Without posting my entire iptables script, I guess I have several general
questions:
1) Can the "flow" diagram in section 3.1 of Oskar's tutorial be relied upon?
I would have thought so, and it has seemed reliable in practice, but the
failure of this one logging rule is now making me doubt that.
2) Under what circumstances would packets not traverse the nat/POSTROUTING
chain, as hinted at by Oskar in the tutorial?
3) Where would be a more appropriate place to put a ulog rule to capture
details of all outbound packets on eth0, and why would that not be the same
place as one to capture details of all outbound packets on eth1? I suspect
the answer to this is intimately related to the answers to 1 and 2 above.
Any help would be appreciated; I can post my iptables script if it would be
useful.
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2005-10-30 12:54 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-17 16:26 logging question Eric Moore
2005-10-17 16:39 ` Stephen Smalley
2005-10-17 21:52 ` Russell Coker
2005-10-17 22:19 ` Luke Kenneth Casson Leighton
2005-10-18 11:56 ` Stephen Smalley
2005-10-18 22:21 ` Russell Coker
2005-10-29 16:00 ` Manoj Srivastava
2005-10-29 16:50 ` Luke Kenneth Casson Leighton
2005-10-30 12:49 ` Dale Amon
-- strict thread matches above, loose matches on Subject: below --
2005-02-09 14:08 Logging question dave beach
[not found] ` <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAqrTb2LYes02Oflamihm4w8 KAAAAQAAAA2SDxWNDfuEmRY16FU7zNcwEAAAAA@rogers.com>
2005-02-09 15:35 ` Samuel Jean
2005-02-09 15:35 ` dave beach
[not found] ` <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAqrTb2LYes02Oflamihm4ww L6DwAQAAAA7ow78K+3jEWLSOFdgBEHbAEAAAAA@rogers.com>
2005-02-09 16:11 ` Samuel Jean
2005-02-09 16:32 ` dave beach
[not found] ` <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAqrTb2LYes02Oflamihm4ww L6DwAQAAAAWHMJM5wRT0u+QcOQ5qBuJQEAAAAA@rogers.com>
2005-02-09 17:08 ` Samuel Jean
2005-02-09 17:02 ` dave beach
2005-02-11 13:45 ` dave beach
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.