what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

zataz-gtkdiskfree-09052005.txt

zataz-gtkdiskfree-09052005.txt
Posted Sep 20, 2005
Authored by ZATAZ Audits | Site zataz.net

gtkdiskfree versions less than or equal to 1.9.3 create temporary files insecurely.

tags | advisory
SHA-256 | 3edafa77e03edab3c9e2796b7fcbcf17a8bdd3c24c5492a686808376a7a06213

zataz-gtkdiskfree-09052005.txt

Change Mirror Download
#########################################################

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.
Login or Register to add favorites

File Archive:

July 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    27 Files
  • 2
    Jul 2nd
    10 Files
  • 3
    Jul 3rd
    35 Files
  • 4
    Jul 4th
    27 Files
  • 5
    Jul 5th
    18 Files
  • 6
    Jul 6th
    0 Files
  • 7
    Jul 7th
    0 Files
  • 8
    Jul 8th
    28 Files
  • 9
    Jul 9th
    44 Files
  • 10
    Jul 10th
    24 Files
  • 11
    Jul 11th
    25 Files
  • 12
    Jul 12th
    11 Files
  • 13
    Jul 13th
    0 Files
  • 14
    Jul 14th
    0 Files
  • 15
    Jul 15th
    28 Files
  • 16
    Jul 16th
    6 Files
  • 17
    Jul 17th
    34 Files
  • 18
    Jul 18th
    6 Files
  • 19
    Jul 19th
    0 Files
  • 20
    Jul 20th
    0 Files
  • 21
    Jul 21st
    0 Files
  • 22
    Jul 22nd
    0 Files
  • 23
    Jul 23rd
    0 Files
  • 24
    Jul 24th
    0 Files
  • 25
    Jul 25th
    0 Files
  • 26
    Jul 26th
    0 Files
  • 27
    Jul 27th
    0 Files
  • 28
    Jul 28th
    0 Files
  • 29
    Jul 29th
    0 Files
  • 30
    Jul 30th
    0 Files
  • 31
    Jul 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close