<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>182998</bug_id>
          
          <creation_ts>2007-06-23 18:30 0000</creation_ts>
          <short_desc>sys-process/cronbase insecure permissions because of portage behaviour</short_desc>
          <delta_ts>2008-07-11 11:33:40 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Security</product>
          <component>Vulnerabilities</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <status_whiteboard>A4? [noglsa]</status_whiteboard>
          
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>jakub@gentoo.org</reporter>
          <assigned_to>security@gentoo.org</assigned_to>
          <cc>cron-bugs@gentoo.org</cc>
    
    <cc>falco@gentoo.org</cc>
    
    <cc>pacho@condmat1.ciencias.uniovi.es</cc>

      

      
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2007-06-23 18:30:48 0000</bug_when>
            <thetext>OK, this is how it *should* look like per sys-process/cronbase ebuild:

drwxr-x--- 2 root root 216 2007-06-13 17:11 /etc/cron.daily
drwxr-x--- 2 root root  72 2006-03-08 22:05 /etc/cron.hourly
drwxr-x--- 2 root root 136 2007-06-22 22:51 /etc/cron.monthly
drwxr-x--- 2 root root  72 2007-01-06 13:01 /etc/cron.weekly
drwxr-x--- 4 root cron 120 2006-03-08 22:06 /var/spool/cron
drwxr-x--- 2 root root 200 2007-06-23 20:10 /var/spool/cron/lastrun

Except that portage does *not* change actual directory permissions if the directory already exists (see Bug 141619). A quick poll on #gentoo-dev shows that almost *noone* has the permissions right, most usually they are 0755 root:root, a couple of cases of /var/spool/cron owned by cron user, etc. etc. Also see Bug 182983.

Suggested solution: revbump sys-process/cronbase and force chown/chmod in pkg_postinst, which works around portage behaviour.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>py@gentoo.org</who>
            <bug_when>2007-07-15 15:31:03 0000</bug_when>
            <thetext>cron, what&apos;s the status here? please advise.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>falco@gentoo.org</who>
            <bug_when>2007-08-29 21:04:53 0000</bug_when>
            <thetext>cronbase ebuild activity is rather low. I did the last revbump of vixie-cron and i can take care of cronbase too. (then i should join the cron herd)

Just ping me again if noone of the cron herd wakes up.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>py@gentoo.org</who>
            <bug_when>2007-09-22 18:53:02 0000</bug_when>
            <thetext>(In reply to comment #2)
&gt; cronbase ebuild activity is rather low. I did the last revbump of vixie-cron
&gt; and i can take care of cronbase too. (then i should join the cron herd)
&gt; 
&gt; Just ping me again if noone of the cron herd wakes up.
&gt; 

*ping* :)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>falco@gentoo.org</who>
            <bug_when>2007-09-26 21:37:37 0000</bug_when>
            <thetext>Hi arches,

cronbase-0.3.2-r1 commited to the tree.

After having emerged it, your system should be as described in comment #0.

Please test, and mark stable if appropriate, thanks.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>cla@gentoo.org</who>
            <bug_when>2007-09-26 23:10:59 0000</bug_when>
            <thetext>(In reply to comment #4)
&gt; After having emerged it, your system should be as described in comment #0.

*Mainly* that&apos;s happened. The only difference is uid/gid bit:
drwxr-s--- 2 root cron 4096 wrz 27 00:58 /var/spool/cron/lastrun
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>fmccor@gentoo.org</who>
            <bug_when>2007-09-26 23:26:54 0000</bug_when>
            <thetext>Sparc done.  It sets ownership/permissions the way bug says it&apos;s supposed to.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kumba@gentoo.org</who>
            <bug_when>2007-09-27 01:43:58 0000</bug_when>
            <thetext>mips stable.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jer@gentoo.org</who>
            <bug_when>2007-09-27 01:44:29 0000</bug_when>
            <thetext>Stable for HPPA.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>fauli@gentoo.org</who>
            <bug_when>2007-09-27 07:56:10 0000</bug_when>
            <thetext>x86 stable</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>armin76@gentoo.org</who>
            <bug_when>2007-09-27 11:08:04 0000</bug_when>
            <thetext>alpha/ia64 stable</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ranger@gentoo.org</who>
            <bug_when>2007-09-27 16:33:52 0000</bug_when>
            <thetext>ppc64 stable</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>philantrop@gentoo.org</who>
            <bug_when>2007-09-28 17:42:44 0000</bug_when>
            <thetext>Marked stable on amd64.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dertobi123@gentoo.org</who>
            <bug_when>2007-09-28 19:18:27 0000</bug_when>
            <thetext>ppc stable</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>rbu@gentoo.org</who>
            <bug_when>2007-09-28 23:01:15 0000</bug_when>
            <thetext>If this stays at A4, it needs a vote.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>py@gentoo.org</who>
            <bug_when>2007-09-29 14:12:54 0000</bug_when>
            <thetext>Hmm, this is local, minor impact, so I vote NO.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>falco@gentoo.org</who>
            <bug_when>2007-10-02 21:22:11 0000</bug_when>
            <thetext>only information disclosure. No big impact. No and closing. Feel free to reopen if you disagree</thetext>
          </long_desc>
      
    </bug>

</bugzilla>