Bug 4097 - "login[423]: segfault" for minimal image
Summary: "login[423]: segfault" for minimal image
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.4
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 1.4 M6
Assignee: Saul Wold
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-03-25 09:56 UTC by Stoicescu Cornel
Modified: 2013-05-01 13:24 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stoicescu Cornel 2013-03-25 09:56:30 UTC
Tested in master: 9ffee9add2d0380f4025e7a678a166f25a7d659e

1) start a core-image-minimal-qemux86-64
2) at login screen, give an invalid username (ex: asdf)
3) give any value for the password field and press enter

Notice error:
"
qemux86-64 login: asdf
Password:
login[426]: segfault at 0 ip 00007f11ed047cb6 sp 00007fff7127bef8 error 4 in libc-2.17.so[7f11ecfc5000+1a7000]

Poky 8.0 (Yocto Project 1.3 Reference Distro) 1.3+snapshot-20130321 qemux86-64 ttyS0

qemux86-64 login:
"
Comment 1 Darren Hart 2013-03-25 15:48:23 UTC
This seems very unlikely to be a BSP-specific bug. Are you seeing this on any other BSP?
Comment 2 Stoicescu Cornel 2013-03-25 15:55:01 UTC
It is a general issue with core-image-minimal images. I believe I should have placed this in the OE-CORE product. Changing accordingly.
Comment 3 Chen Qi 2013-03-26 08:14:31 UTC
confirmed on qemux86 and qemuarm.

And it's not restricted to minimal image.

The same problem appeared on sato-sdk image:
root@qemuarm:/etc# login   

qemuarm login: jfiewoefiwof
Password: 
Segmentation fault
Comment 4 Stoicescu Cornel 2013-03-26 08:25:07 UTC
Indeed but it is not a general issue. core-image-lsb-sdk for instance does not have this issue (tested core-image-lsb-sdk-jasperforest).
Comment 5 Saul Wold 2013-04-05 02:33:16 UTC
I debugged this issue down to the new version of the crypt() code in eglibc 2.17, it expects 2 valid chars as part the chipher, or it returns NULL. The tinylogin code uses the return to do a strcmp(). This causes the segfault.

There is also an issue in the shadow version of login, but manifests itself as a perror: crypt: Invalid Argument.

There are potential fixes for both of these that are being looked into currently.
Comment 7 Alexandru Palalau 2013-05-01 13:24:18 UTC
Verified on master branch:
Commit ID: c42cc8fb38aee46f4778b9c68412a47ae5919923