Bug 29309 - login dumps core
Summary: login dumps core
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: util-linux
Version: 7.0
Hardware: i386
OS: Linux
high
medium
Target Milestone: ---
Assignee: Erik Troan
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-02-24 23:43 UTC by Need Real Name
Modified: 2007-03-27 03:41 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-02-26 13:01:44 UTC
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2001-02-24 23:43:13 UTC
In the directory /root/
I found a file core which belongs to login program.
rpm -qf /bin/login 
util-linux-2.10m-12

The symbols are stripped, so the trace seems not very useful,
but you probably can extract the real trace 
by re-linking login with debugging symbols.

ls -l core 
-rw-------    1 root     root       491520 Feb 20 12:43 core

gdb /bin/login core
....
(gdb) bt
#0  strncpy (s1=0xbfffd61c "", s2=0x0, n=32) at
../sysdeps/generic/strncpy.c:41
#1  0x8049e6e in strcpy () at ../sysdeps/generic/strcpy.c:31
#2  0x7974742f in ?? ()
Cannot access memory at address 0x7665642f
(gdb) 

I can not tell why it happened, I just found a core file.
This may be a security problem, because if login has
some buffer overflow this will compromize everything.

The core is definitely from /bin/login:

#strings core |less
CORE
CORE
login
login      
CORE
login
CORE
 failure forking: %s
setuid() failed
No directory %s!
Logging in with home = "/".
login: no memory for shell script.
exec 
login: couldn't exec shell script: %s.
login: no shell: %s.
.....

Comment 1 Karsten Hopp 2001-02-26 13:01:06 UTC
This one is easy to reproduce:
- Login as normal user
- type 'login'
- hit CTRL-D a few times --> core dump

Comment 2 Karsten Hopp 2001-02-26 14:07:55 UTC
Upgrade to pam-0.74-12 fixed this


Note You need to log in before you can comment on or make changes to this bug.