From djb@cr.yp.to Wed Dec 15 14:21:53 2004 Date: 15 Dec 2004 08:22:45 -0000 From: D. J. Bernstein To: securesoftware@list.cr.yp.to, mike@mikekohn.net Subject: [remote] [control] vb2c 0.02 parse_sub overflows token buffer Qiao Zhang, a student in my Fall 2004 UNIX Security Holes course, has discovered a remotely exploitable security hole in vb2c. I'm publishing this notice, but all the discovery credits should be assigned to Zhang. You are at risk if you take a FRM file from an email message (or a web page or any other source that could be controlled by an attacker) and feed that file through vb2c. (The vb2c documentation does not tell users to avoid taking input from the network.) Whoever provides that file then has complete control over your account: she can read and modify your files, watch the programs you're running, etc. Proof of concept: On an x86 computer running FreeBSD 4.10, as root, type cd /usr/ports/devel/vb2c make install to download and compile the vb2c program, version 0.02 (current). Then, as any user, save the file 34.frm attached to this message, and type vb2c 34 with the unauthorized result that a file named EXPLOITED is created in the current directory. Here's the bug: In vb2c.c, parse() uses gettoken() to read any number of bytes into a 255-byte token[] array. ---D. J. Bernstein, Associate Professor, Department of Mathematics, Statistics, and Computer Science, University of Illinois at Chicago [ Part 2, Text/PLAIN (charset: unknown-8bit) 17 lines. ] [ Unable to print this part. ]