Bug 115809

Summary: smb4k: temp file problems
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Thomas Biege <thomas>
Component: KDEAssignee: E-mail List <kde-maintainers>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: security-team
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: All   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Thomas Biege 2005-09-08 09:24:09 UTC
Hello,
and another one for STABLE/SL10

 _______________________________________________________________________

                Mandriva Linux Security Update Advisory
 _______________________________________________________________________

 Package name:           smb4k
 Advisory ID:            MDKSA-2005:157
 Date:                   September 6th, 2005

 Affected versions:      10.1, 10.2
 ______________________________________________________________________

 Problem Description:

 A severe security issue has been discovered in Smb4K. By linking a
 simple text file FILE to /tmp/smb4k.tmp or /tmp/sudoers, an attacker
 could get access to the full contents of the /etc/super.tab or
 /etc/sudoers file, respectively, because Smb4K didn't check for the
 existance of these files before writing any contents. When using super,
 the attack also resulted in /etc/super.tab being a symlink to FILE.

 Affected are all versions of the 0.4, 0.5, and 0.6 series of Smb4K.

 The updated packages have been patched to correct this problem.
 _______________________________________________________________________

 References:

  http://smb4k.berlios.de
 ______________________________________________________________________

 Updated P
 Mandrakelinux 10.1:
 dd4471a3de6feb035637f15dd75d8d56  10.1/RPMS/smb4k-0.4.0-3.1.101mdk.i586.rpm
 d56d014b32bf1ec767fc018f0e40c245  10.1/SRPMS/smb4k-0.4.0-3.1.101mdk.src.rpm

 Mandrakelinux 10.2:
 a1fd04d53c4c32d69f74bf17a255c250  10.2/RPMS/smb4k-0.5.1-1.1.102mdk.i586.rpm
 30d1745f5dafea4c2d12c7b6a7c09526  10.2/SRPMS/smb4k-0.5.1-1.1.102mdk.src.rpm
 _______________________________________________________________________

 To upgrade automatically use MandrakeUpdate or urpmi.  The verification
 of md5 checksums and GPG signatures is performed automatically for you.

 All packages are signed by Mandriva for security.  You can obtain the
 GPG public key of the Mandriva Security Team by executing:

  gpg --recv-keys --keyserver pgp.mit.edu 0x22458A98

 You can view other update advisories for Mandriva Linux at:

  http://www.mandriva.com/security/advisories

 If you want to report vulnerabilities, please contact

  security_(at)_mandriva.com
 _______________________________________________________________________

 Type Bits/KeyID     Date       User ID
 pub  1024D/22458A98 2000-07-10 Mandriva Security Team
  <security*mandriva.com>

-----BEGIN PGP SIGNATURE-----
ackages:
Comment 1 Dirk Mueller 2005-09-08 10:03:33 UTC
a version update for stable is out of question ?  
  
reading the changelog the 0.6.0 (what we have in RC1) and 0.6.3 only differ in 
security fixes and crash/leak fixes.  
 
 
Comment 3 Dirk Mueller 2005-09-08 12:40:24 UTC
ok, after some diffing I finally found the "fix" 
 
+      QFile tmp_file( "sudoers" ); 
+      QDir::setCurrent( "/tmp" ); 
+ 
+      QFileInfo tmp_file_info; 
+      tmp_file_info.setFile( tmp_file ); 
+ 
+      if ( !tmp_file.exists() ) 
+      { 
+        *m_proc << "kdesu "+KProcess::quote( "cp "+sudoers_item.path()+" /tmp 
&& chown "+QString( "%1:%2" ).arg( getuid() ).arg( getgid() )+" /tmp/sudoers 
&& chmod 0666 /tmp/sudoers" ); 
+        m_proc->start( KProcess::NotifyOnExit, KProcess::Stderr ); 
+      } 
+      else 
+      { 
+        emit error( ERROR_WRITING_FILE, tmp_file_info.absFilePath() ); 
+        return false; 
+      }     
 
Comment 4 Dirk Mueller 2005-09-08 12:41:09 UTC
after discussing with coolo&&adrian we decided to drop the package for 10.0 
 
 
Comment 5 Dirk Mueller 2005-09-17 08:25:58 UTC
post 10.0 
Comment 6 Dirk Mueller 2005-09-17 13:44:42 UTC
talked with upstream.. they're fixing this particular issue ATM 
Comment 7 Thomas Biege 2005-11-04 07:23:19 UTC
Any news here?
Comment 8 Dirk Mueller 2005-11-05 12:59:36 UTC
I've submitted a 0.6.4 update to STABLE which should fix the issue.