Article View: comp.sources.bugs
Article #620bug & patch in unix pop2 server
From: Klamer Schutte -- Universiteit T...
Date: Fri, 22 Feb 1991 14:36
Date: Fri, 22 Feb 1991 14:36
61 lines
2484 bytes
2484 bytes
With the pop2 server as supplied with the LifeLine mail program (part of
pc-nfs) it is possible to read (and delete) a random mailbox on the server.
The bug is that one can connect (with helo) without a passwd. The idea was that
this only should be used to detect the presence of mail; but with a following
fold command one can read any mailbox on the server. My fix is to go back
to the initial state (state 0) after the mail check.
To fix this bug, apply the patch below.
Klamer (.signature at end)
PS note that also several return 0; statements need to be added at the end of
some functions. lint(1) should help!
--- cut here ---
*** popd.c.orig Thu Dec 20 15:45:38 1990
--- popd.c Fri Feb 22 14:37:44 1991
***************
*** 192,198 ****
strcpy (line, "+ POP2 Unix Server on ");
gethostname(&line[strlen(line)], 1024-strlen(line));
! strcat (line, "\r\n");
if (debug) setbuf (stdout, NULL);
--- 192,198 ----
strcpy (line, "+ POP2 Unix Server on ");
gethostname(&line[strlen(line)], 1024-strlen(line));
! strcat (line, " (KS 22/2/91)\r\n");
if (debug) setbuf (stdout, NULL);
***************
*** 281,288 ****
if (check_user(myargv[1], myargv[2]))
return (-1);
msg_cnt = openit(mailbox);
! } else
msg_cnt = checkit(mailbox);
sprintf (line, "#%d\r\n",msg_cnt);
net_out (line);
break;
--- 281,291 ----
if (check_user(myargv[1], myargv[2]))
return (-1);
msg_cnt = openit(mailbox);
! } else {
msg_cnt = checkit(mailbox);
+ /* no passwd, so only helo and quit are allowed -- KS 22/2/91 */
+ next_state = 0;
+ }
sprintf (line, "#%d\r\n",msg_cnt);
net_out (line);
break;
--
Klamer Schutte
Faculty of electrical engineering -- University of Twente, The Netherlands
klamer@mi.eltn.utwente.nl {backbone}!mcsun!mi.eltn.utwente.nl!klamer
Technical Details
Message-ID:
<klamer.667233380@mi.eltn.utwente.nl>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!crdgw1!uunet!mcsun!hp4nl!utrcu1!mi.eltn.utwente.nl!klamerShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!crdgw1!uunet!mcsun!hp4nl!utrcu1!mi.eltn.utwente.nl!klamer From: klamer@mi.eltn.utwente.nl (Klamer Schutte -- Universiteit Twente) Newsgroups: comp.sources.bugs Subject: bug & patch in unix pop2 server Keywords: security hole, pc-nfs, lifeline Message-ID: <klamer.667233380@mi.eltn.utwente.nl> Date: 22 Feb 91 14:36:20 GMT Sender: news@utrcu1.UUCP Organization: University of Twente, BSC-El Lines: 61