Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security VulnWatch
[Top] [All Lists]

[Full-disclosure] gtkdiskfree insecure temporary file creation

Subject: [Full-disclosure] gtkdiskfree insecure temporary file creation
Date: Thu, 15 Sep 2005 09:06:56 +0200
#########################################################

gtkdiskfree insecure temporary file creation

Vendor: http://gtkdiskfree.tuxfamily.org/ (no more avaible)
Advisory: http://www.zataz.net/adviso/gtkdiskfree-09052005.txt
Vendor informed: yes
Exploit available: yes
Impact : low
Exploitation : low

#########################################################

The vulnerability is caused due to temporary file being created insecurely. This can be exploited via symlink attacks to create and overwrite arbitrary files with the privileges of the user running the affected script.

##########
Versions:
##########

gtkdiskfree <= 1.9.3

##########
Solution:
##########

To prevent symlink attack use kernel patch such as grsecurity

#########
Timeline:
#########

Discovered : 2005-09-02
Vendor notified : 2005-09-05
Vendor response : no reponse
Vendor fix : no patch
Vendor Sec report (vendor-sec@lst.de) : 2005-09-05
Disclosure : 2005-09-15

#####################
Technical details :
#####################

Vulnerable code :
-----------------

Take a look at : src/mount.h

23 #define TUBE_NAME                "/tmp/gtkdiskfree"

Then to : src/mount.c

32 open_cmd_tube (const gchar *cmd, const gchar *mount_point)
33 {
34 gint status;
35 gchar error[MAXLINE], *line;
36 FILE *sh, *tmp;
37
38 setbuf(stdout, error);
39 line = g_strconcat(cmd, " ", mount_point, " &> ", TUBE_NAME, NULL);
40 sh = popen(line, "r");
41 g_free(line);
42
43 status = pclose(sh);
44
45 if (status == 0) {
46 remove(TUBE_NAME);
47 gui_list_main_update(GTK_TREE_VIEW(list_treeview));
48
49 return;
50 } else {
51 if ((tmp = fopen(TUBE_NAME, "r")) == NULL) {
52 gui_list_main_update(GTK_TREE_VIEW(list_treeview));
53
54 return;
55 }
56 if (fgets(error, MAXLINE-1, tmp) == NULL) {
57 fclose(tmp);
58 remove(TUBE_NAME);
59 gui_list_main_update(GTK_TREE_VIEW(list_treeview));
60
61 return;
62 }
63 fclose(tmp);
64 remove(TUBE_NAME);
65 error_window(error);
66 }
67 gui_list_main_update(GTK_TREE_VIEW(list_treeview));
68
69 return;
70 }


#########
Related :
#########

Bug report : http://bugs.gentoo.org/show_bug.cgi?id=104565
CVE : No CVE

#####################
Credits :
#####################

Eric Romang (eromang@zataz.net - ZATAZ Audit) - Gentoo Security Scout
Thxs to Gentoo Security Team.

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/

<Prev in Thread] Current Thread [Next in Thread>
  • [Full-disclosure] gtkdiskfree insecure temporary file creation, ZATAZ Audits <=