strange capability problem
I have attached the strace output from the radvd program.
When it is run the following error is logged:
avc: denied { sys_module } for pid=879 exe=/usr/sbin/radvd capability=16 scontext=system_u:system_r:radvd_t tcontext=system_u:system_r:radvd_t tclass=capability
However I can't work out what it does to cause that! The strace.out file contains no query_module() or create_module() call.
The machine which has this problem is not nearly ready for avc_toggle so I can't just put the machine in enforcing mode and see what stops!
Any suggestions?
For reference radvd is a route advisory daemon for IPv6, it's needs in terms of security are very similar to dhcpd.
Signature · 4 lines
If you send email to me or to a mailing list that I use which has >4 lines of legalistic junk at the end then you are specifically authorizing me to do whatever I wish with the message and all other messages from your domain, by posting the message you agree that your long legalistic sig is void.
getpid() = 1411
close(255) = 0rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0rt_sigaction(SIGTSTP, {SIG_DFL}, {SIG_DFL}, 8) = 0rt_sigaction(SIGTTIN, {SIG_DFL}, {SIG_DFL}, 8) = 0rt_sigaction(SIGTTOU, {SIG_DFL}, {SIG_DFL}, 8) = 0rt_sigaction(SIGINT, {SIG_DFL}, {SIG_DFL}, 8) = 0rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_IGN}, 8) = 0rt_sigaction(SIGCHLD, {SIG_DFL}, {0x806f070, [], 0x4000000}, 8) = 0
execve("/sbin/start-stop-daemon", ["start-stop-daemon", "--oknodo", "--start", "--pidfile", "/var/run/radvd.pid", "--exec", "/usr/sbin/radvd"], [/* 20 vars */]) = 0
uname({sys="Linux", node="lyta", ...}) = 0
brk(0) = 0x804c840
open("/etc/ld.so.preload", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=31, ...}) = 0
old_mmap(NULL, 31, PROT_READ|PROT_WRITE, MAP_PRIVATE, 3, 0) = 0x40014000
close(3) = 0
munmap(0x40014000, 31) = 0
open("/etc/ld.so.cache", O_RDONLY) = 3fstat64(3, {st_mode=S_IFREG|0644, st_size=68005, ...}) = 0 old_mmap(NULL, 68005, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000
close(3) = 0open("/lib/libc.so.6", O_RDONLY) = 3read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\30\222"..., 1024) = 1024 fstat64(3, {st_mode=S_IFREG|0755, st_size=1153784, ...}) = 0 old_mmap(NULL, 1166560, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40025000 mprotect(0x40138000, 40160, PROT_NONE) = 0
old_mmap(0x40138000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x113000) = 0x40138000
old_mmap(0x4013e000, 15584, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4013e000
close(3) = 0
munmap(0x40014000, 68005) = 0
stat64("/usr/sbin/radvd", {st_mode=S_IFREG|0755, st_size=42036, ...}) = 0
brk(0) = 0x804c840
brk(0x804c9c0) = 0x804c9c0
brk(0x804d000) = 0x804d000
open("/var/run/radvd.pid", O_RDONLY) = -1 ENOENT (No such file or directory)
execve("/usr/sbin/radvd", ["/usr/sbin/radvd"], [/* 20 vars */]) = 0
uname({sys="Linux", node="lyta", ...}) = 0
brk(0) = 0x8053074
open("/etc/ld.so.preload", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=31, ...}) = 0
old_mmap(NULL, 31, PROT_READ|PROT_WRITE, MAP_PRIVATE, 3, 0) = 0x40014000
close(3) = 0
munmap(0x40014000, 31) = 0
open("/etc/ld.so.cache", O_RDONLY) = 3fstat64(3, {st_mode=S_IFREG|0644, st_size=68005, ...}) = 0 old_mmap(NULL, 68005, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000
close(3) = 0open("/lib/libc.so.6", O_RDONLY) = 3read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\30\222"..., 1024) = 1024 fstat64(3, {st_mode=S_IFREG|0755, st_size=1153784, ...}) = 0 old_mmap(NULL, 1166560, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40025000 mprotect(0x40138000, 40160, PROT_NONE) = 0
old_mmap(0x40138000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x113000) = 0x40138000
old_mmap(0x4013e000, 15584, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4013e000
close(3) = 0
munmap(0x40014000, 68005) = 0
time(NULL) = 1022174874
brk(0) = 0x8053074
brk(0x8053204) = 0x8053204
brk(0x8054000) = 0x8054000
brk(0x8057000) = 0x8057000
time([1022174874]) = 1022174874
open("/etc/localtime", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1074, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40014000
read(3, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\r\0\0\0\r\0"..., 4096) = 1074
close(3) = 0
munmap(0x40014000, 4096) = 0
getpid() = 1411rt_sigaction(SIGPIPE, {0x400f1f28, [], 0x4000000}, {SIG_DFL}, 8) = 0socket(PF_UNIX, SOCK_DGRAM, 0) = 3fcntl64(3, F_SETFD, FD_CLOEXEC) = 0connect(3, {sin_family=AF_UNIX, path="/dev/log"}, 16) = 0 send(3, "<30>May 23 19:27:54 radvd[1411]:"..., 54, 0) = 54 rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0socket(PF_INET6, SOCK_RAW, 58) = 4setsockopt(4, SOL_IPV6, 2, [1], 4) = 0setsockopt(4, SOL_RAW, 0x7 /* RAW_??? */, [2], 4) = 0
setsockopt(4, SOL_IPV6, 16, [255], 4) = 0
setsockopt(4, SOL_IPV6, 18, [255], 4) = 0
setsockopt(4, SOL_IPV6, 8, [1], 4) = 0
setsockopt(4, SOL_ICMPV6, 1, [-1], 32) = 0
open("/etc/radvd.conf", O_RDONLY) = 5
close(5) = 0
socket(PF_UNIX, SOCK_STREAM, 0) = 5connect(5, {sin_family=AF_UNIX, path="/var/run/.nscd_socket"}, 110) = 0 write(5, "\2\0\0\0\0\0\0\0\5\0\0\0", 12) = 12write(5, "root\0", 5) = 5read(5, "h7\26@\1\0\0\0\5\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\5\0\0\0"..., 36) = 36 read(5, "root\0x\0root\0/root\0/bin/bash\0", 28) = 28
close(5) = 0stat64("/etc/radvd.conf", {st_mode=S_IFREG|0644, st_size=75, ...}) = 0 _sysctl({{CTL_NET, NET_IPV6, NET_IPV6_CONF, 10, fffffffe, 1}, 5, 0xbfffea90, 4, (nil), 0}) = 0open("/etc/radvd.conf", O_RDONLY) = 5
brk(0x805c000) = 0x805c000ioctl(5, SNDCTL_TMR_TIMEBASE, 0xbfffe138) = -1 ENOTTY (Inappropriate ioctl for device) fstat64(5, {st_mode=S_IFREG|0644, st_size=75, ...}) = 0old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40014000read(5, "interface eth0\n{\n AdvSendAdver"..., 8192) = 75read(5, "", 4096) = 0ioctl(4, 0x8913, 0xbfffe22c) = -1 ENOSYS (Function not implemented)ioctl(4, 0x8913, 0xbfffe22c) = -1 ENOSYS (Function not implemented)
ioctl(4, 0x8913, 0xbfffe22c) = -1 ENODEV (No such device) time([1022174874]) = 1022174874 getpid() = 1411
rt_sigaction(SIGPIPE, {0x400f1f28, [], 0x4000000}, {SIG_DFL}, 8) = 0 send(3, "<27>May 23 19:27:54 radvd[1411]:"..., 84, 0) = 84 rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0time([1022174874]) = 1022174874getpid() = 1411rt_sigaction(SIGPIPE, {0x400f1f28, [], 0x4000000}, {SIG_DFL}, 8) = 0 send(3, "<27>May 23 19:27:54 radvd[1411]:"..., 77, 0) = 77 rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0_exit(1) = ?
Quoted 9 lines · Russell Coker
I have attached the strace output from the radvd program.
When it is run the following error is logged:
avc: denied {sys_module} for pid=879 exe=/usr/sbin/radvd capability=16 scontext=system_u:system_r:radvd_t tcontext=system_u:system_r:radvd_t tclass=capabilityHowever I can't work out what it does to cause that! The strace.out file contains no
query_module()orcreate_module()call.
CAP_SYS_MODULE is only required for the create_module(), init_module(), delete_module() calls and for modifying the cap-bound sysctl variable. Does lsmod show any difference before and after radvd is started?
--
Stephen D. Smalley, NAI Labs
[email protected]
--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.