Bug 20027 - /usr/sbin/userhelper dies in segmentation fault
Summary: /usr/sbin/userhelper dies in segmentation fault
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: usermode
Version: 6.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-10-30 11:47 UTC by Jarno Huuskonen
Modified: 2007-04-18 16:29 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-10-30 11:47:32 UTC
Embargoed:


Attachments (Terms of Use)

Description Jarno Huuskonen 2000-10-30 11:47:30 UTC
/usr/sbin/userhelper dumps core if read_string returns NULL (ie. user
presses ctrl-d (no other input)).
This can be reproduced /usr/sbin/userhelper -s -d 1 2 3 (I don't think the
-d parameter matters).
and type anything+enter and immediately press ctrl-d
--> segmentation fault

-Jarno

Here's a patch (this fixes that seg. fault, but I don't know if this is
correct way to fix it).

--- usermode-1.36/userhelper.c-orig     Mon Oct 30 13:39:18 2000
+++ usermode-1.36/userhelper.c  Mon Oct 30 13:40:51 2000
@@ -234,7 +234,7 @@
            case PAM_PROMPT_ECHO_OFF:
                reply[count].resp_retcode = PAM_SUCCESS;
                reply[count].resp = read_string();
-               if(reply[count].resp[0] == UH_ABORT) {
+               if(reply[count].resp && reply[count].resp[0] == UH_ABORT) {
                     fallback_flag = TRUE;
                    free (reply);
                    return PAM_MAXTRIES; /* Shrug. */

Comment 1 Nalin Dahyabhai 2000-10-30 20:36:34 UTC
This will be fixed in 1.37 in Raw Hide.  Thanks!


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