Bug 115765 - uucpd from net/freebsd-uucp traps with PAM and unknown user
Summary: uucpd from net/freebsd-uucp traps with PAM and unknown user
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dirk Meyer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-23 20:20 UTC by Valentin Nechayev
Modified: 2007-09-10 11:03 UTC (History)
0 users

See Also:


Attachments
file.diff (398 bytes, patch)
2007-08-23 20:20 UTC, Valentin Nechayev
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Valentin Nechayev 2007-08-23 20:20:02 UTC
In port net/freebsd-uucp:

When compiled with PAM, uucpd shows the following bug: if user specified
in command line is unknown, getpwnam() returns NULL; then, auth_pam()
tries to extract pw->pw_name and gets SIGSEGV.

gdb'ing of core file shows:

#0  0x08049778 in auth_pam () at uucpd.c:354
354             cred_t auth_cred = { pw->pw_name, passwd };
(gdb) p pw
$1 = (struct passwd *) 0x0

This isn't kind of security problem but rather annoys.

Fix: Patch uucpd.c (I don't know whether to better patch by port system
or in repository) with the following patch.
I also added sleep(3) on bad login according to common practice.
How-To-Repeat: 
Compile and install the port, start uucpd from inetd or command line,
enter unknown user and arbitrary password.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2007-08-23 20:20:18 UTC
Responsible Changed
From-To: freebsd-ports-bugs->dinoex

Over to maintainer
Comment 2 Dirk Meyer freebsd_committer freebsd_triage 2007-09-09 19:38:37 UTC
State Changed
From-To: open->analyzed

- path in patch was wrong, it does now apply cleanly
Comment 3 dfilter service freebsd_committer freebsd_triage 2007-09-10 10:16:29 UTC
dinoex      2007-09-10 09:16:23 UTC

  FreeBSD ports repository

  Modified files:
    net/freebsd-uucp     Makefile distinfo 
  Removed files:
    net/freebsd-uucp/files patch-uucico-Makefile 
  Log:
  - update to 1.07.3
    fix linking with option ENCRYPTED_PASSWORDS
    fix traps with PAM and unknown user
  PR:             115765
  Submitted by:   Valentin Nechayev
  
  Revision  Changes    Path
  1.43      +1 -1      ports/net/freebsd-uucp/Makefile
  1.18      +3 -3      ports/net/freebsd-uucp/distinfo
  1.2       +0 -13     ports/net/freebsd-uucp/files/patch-uucico-Makefile (dead)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 4 Dirk Meyer freebsd_committer freebsd_triage 2007-09-10 11:02:49 UTC
State Changed
From-To: analyzed->closed

committed, thanks.