Bug 744379 - SELinux is preventing /usr/bin/gpg from 'read' accesses on the file .spamassassin6872XIpEnbtmp.
Summary: SELinux is preventing /usr/bin/gpg from 'read' accesses on the file .spamassa...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 15
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:565e0ad4b84...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-08 06:44 UTC by Steve
Modified: 2011-12-04 02:36 UTC (History)
7 users (show)

Fixed In Version: selinux-policy-3.9.16-48.fc15
Clone Of:
Environment:
Last Closed: 2011-12-04 02:36:52 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Steve 2011-10-08 06:44:24 UTC
SELinux is preventing /usr/bin/gpg from 'read' accesses on the file .spamassassin6872XIpEnbtmp.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that gpg should be allowed read access on the .spamassassin6872XIpEnbtmp file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep gpg /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:gpg_t:s0-s0:c0.c1023
Target Context                system_u:object_r:spamd_tmp_t:s0
Target Objects                .spamassassin6872XIpEnbtmp [ file ]
Source                        gpg
Source Path                   /usr/bin/gpg
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           gnupg-1.4.11-3.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-39.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.40.6-0.fc15.x86_64 #1 SMP Tue Oct
                              4 00:39:50 UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Sat 08 Oct 2011 04:37:07 AM CEST
Last Seen                     Sat 08 Oct 2011 04:37:07 AM CEST
Local ID                      5dc81208-f6ae-4eb6-b713-88faca15c522

Raw Audit Messages
type=AVC msg=audit(1318041427.474:431): avc:  denied  { read } for  pid=6876 comm="gpg" name=".spamassassin6872XIpEnbtmp" dev=dm-1 ino=15728814 scontext=system_u:system_r:gpg_t:s0-s0:c0.c1023 tcontext=system_u:object_r:spamd_tmp_t:s0 tclass=file


type=SYSCALL msg=audit(1318041427.474:431): arch=x86_64 syscall=open success=no exit=EACCES a0=7fff808a1f47 a1=0 a2=1b6 a3=0 items=0 ppid=6872 pid=6876 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=47 comm=gpg exe=/usr/bin/gpg subj=system_u:system_r:gpg_t:s0-s0:c0.c1023 key=(null)

Hash: gpg,gpg_t,spamd_tmp_t,file,read

audit2allow

#============= gpg_t ==============
allow gpg_t spamd_tmp_t:file read;

audit2allow -R

#============= gpg_t ==============
allow gpg_t spamd_tmp_t:file read;

Comment 1 Miroslav Grepl 2011-10-10 11:28:00 UTC
Could you tell me more about your configuration? What are you doing?

Is this related to spamassassion, cron and gpg togegter?

Comment 2 Steve 2011-10-10 11:51:49 UTC
I do nothing, this comes over night, every night. Maybe it has something to do with claws-mail?

Comment 3 Miroslav Grepl 2011-10-10 21:03:06 UTC
Fixed in selinux-policy-3.9.16-43.fc15

Comment 4 Paul Howarth 2011-10-31 07:45:07 UTC
(In reply to comment #3)
> Fixed in selinux-policy-3.9.16-43.fc15

I'm running selinux-policy-3.9.16-44.fc15.noarch and I'm still getting these:

type=AVC msg=audit(1320041360.252:617203): avc:  denied  { read } for  pid=21141 comm="gpg" name=".spamassassin211405Xq9ontmp" dev=dm-12 ino=27 scontext=system_u:system_r:gpg_t:s0-s0:c0.c1023 tcontext=system_u:object_r:spamd_tmp_t:s0 tclass=file
type=SYSCALL msg=audit(1320041360.252:617203): arch=c000003e syscall=2 success=no exit=-13 a0=7fff19ea6f45 a1=0 a2=1b6 a3=0 items=0 ppid=21140 pid=21141 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=54008 comm="gpg" exe="/usr/bin/gpg" subj=system_u:system_r:gpg_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1320041363.500:617204): avc:  denied  { read } for  pid=21143 comm="gpg" name=".spamassassin21140GuLq01tmp" dev=dm-12 ino=27 scontext=system_u:system_r:gpg_t:s0-s0:c0.c1023 tcontext=system_u:object_r:spamd_tmp_t:s0 tclass=file
type=SYSCALL msg=audit(1320041363.500:617204): arch=c000003e syscall=2 success=no exit=-13 a0=7fff9645bf45 a1=0 a2=1b6 a3=0 items=0 ppid=21140 pid=21143 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=54008 comm="gpg" exe="/usr/bin/gpg" subj=system_u:system_r:gpg_t:s0-s0:c0.c1023 key=(null)

This is happening when the nightly sa-update cron job runs, and results in mail like this every morning:

error: GPG validation failed!
The update downloaded successfully, but the GPG signature verification
failed.
channel: GPG validation failed, channel failed
error: GPG validation failed!
The update downloaded successfully, but the GPG signature verification
failed.
channel: GPG validation failed, channel failed
31-Oct-2011 06:09:23: SpamAssassin: Update available, but download or extract failed

Comment 5 Miroslav Grepl 2011-10-31 08:35:05 UTC
I am fixing it.

Comment 6 Miroslav Grepl 2011-10-31 08:38:50 UTC
Fixed in selinux-policy-3.9.16-46.fc15

Comment 7 Paul Howarth 2011-11-09 10:01:20 UTC
Thanks, Miroslav: selinux-policy-3.9.16-46.fc15 works for me, though I had to pull it from koji since it's not been submitted as an update yet.

Comment 8 Fedora Update System 2011-11-16 16:18:36 UTC
selinux-policy-3.9.16-48.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-48.fc15

Comment 9 Fedora Update System 2011-11-17 23:36:56 UTC
Package selinux-policy-3.9.16-48.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.9.16-48.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-16023/selinux-policy-3.9.16-48.fc15
then log in and leave karma (feedback).

Comment 10 Fedora Update System 2011-12-04 02:36:52 UTC
selinux-policy-3.9.16-48.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.