Bugtraq mailing list archives
Re: ftpd and setproctitle()
From: peak () ARGO TROJA MFF CUNI CZ (Pavel Kankovsky)
Date: Sat, 8 Jul 2000 20:53:42 +0200
On Fri, 7 Jul 2000, D. J. Bernstein wrote:
Move gets() to /usr/lib/libbugpronestandards.a.
A sufficiently recent version of glibc with a sufficiently recent version of ld from GNU binutils will print an annoying message when you ask it to link a program using gets() (and perhaps other functions considered dangerous).
For several years I've been systematically identifying and redesigning bug-prone interfaces. I don't have any more memory leaks, for example, because I'm now using memory-allocation interfaces where leaks are more difficult to write than correct code.
Can you enlighten us, please? You certainly do not speak about alloc() and alloc_free() (more or less wrappers for standard malloc() and free() for those who have never seen any DJB code). Avoiding complex data structures (esp. if their lifespan is not global) and making programs small so they can die whenever something wrong happens (letting the kernel builtin "garbage collector" clean up) is more a matter of style than of an interface. Perhaps you speak about your stralloc stuff?
In 1996, when I identified the flaw under discussion in setproctitle() et al., I worked out several solutions. Simplest was to make sure that typical strings fail miserably as format strings. Replace setproctitle() with a setproctitlex() that
The simplest solution for setproctitle() is to get rid of that function completely. It is next to useless and its careless use can lead to a serious information leakage: once upon a time, one in.ftpd used to publish PASS command together with its argument (i.e. the password). --Pavel Kankovsky aka Peak [ Boycott Microsoft--http://www.vcnet.com/bms ] "Resistance is futile. Open your source code and prepare for assimilation."
Current thread:
- Re: More Detailed Info on the BitchX Format Bugs, (continued)
- Re: More Detailed Info on the BitchX Format Bugs Ryan Russell (Jul 07)
- Re: More Detailed Info on the BitchX Format Bugs RoboHak (Jul 09)
- opieftpd setproctitle() patches Kris Kennaway (Jul 10)
- Remote DoS Attack in WircSrv Irc Server v5.07s Vulnerability Ussr Labs (Jul 10)
- Security Update: Denial of Service against irc-BX Technical Support (Jul 07)
- Out of order SMTP DATA commands incorrectly allow pass-through mode in some firewall smtp filters/proxies Lincoln Yeoh (Jul 08)
- Re: More Detailed Info on the BitchX Format Bugs Ryan Russell (Jul 07)
- Re: ftpd and setproctitle() D. J. Bernstein (Jul 07)
- Re: ftpd and setproctitle() Bernd Luevelsmeyer (Jul 07)
- Re: ftpd and setproctitle() Firstname Lastname (Jul 10)
- BitchX update Vincent Danen (Jul 07)
- Re: ftpd and setproctitle() Pavel Kankovsky (Jul 08)
- Re: ftpd and setproctitle() Bernd Luevelsmeyer (Jul 07)
- ANNOUNCE: PScan, a simple security scanner. Alan DeKok (Jul 07)
- Re: ftpd and setproctitle() Roger Espel Llima (Jul 07)
- Re: ftpd and setproctitle() Adam McKenna (Jul 07)
- Security Update: symlink attack on makewhatis script possible Technical Support (Jul 07)
- Re: ftpd and setproctitle() Nic Bellamy (Jul 07)