Bug 20027 - /usr/sbin/userhelper dies in segmentation fault
/usr/sbin/userhelper dies in segmentation fault
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: usermode (Show other bugs)
6.2
All Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-10-30 06:47 EST by Jarno Huuskonen
Modified: 2007-04-18 12:29 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-10-30 06:47:32 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jarno Huuskonen 2000-10-30 06:47:30 EST
/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 15:36:34 EST
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.