Bug 59080

Summary: doing: userhelper -w /// will cause SEGV
Product: [Retired] Red Hat Linux Reporter: Luki Rustianto <luki>
Component: usermodeAssignee: Jindrich Novy <jnovy>
Status: CLOSED CURRENTRELEASE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: pknirsch
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-09-30 00:38:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Luki Rustianto 2002-01-30 17:43:42 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.4.2-2 i686)

Description of problem:
command:
userhelper -w ///
will cause segmentation fault

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.userhelper -w ///
2.
3.
	

Actual Results:  the userhelper program segmentation fault

Additional info:

[luki@gringgo luki]$ cat /etc/redhat-release
Red Hat Linux release 7.1 (Seawolf)
[luki@gringgo luki]$ userhelper -w //
Segmentation fault

In userhelper.c line 615: did not check NULL return result from
svNewFile(apps_filename), it should be

possibly fix:
--- userhelper.orig.c   Thu Jan 31 00:13:42 2002
+++ userhelper.c        Thu Jan 31 00:14:18 2002
@@ -612,7 +612,7 @@
        snprintf(apps_filename, aft, "/etc/security/console.apps/%s", progname);
        s = svNewFile(apps_filename);
 
-       if (fstat(s->fd, &sbuf) ||
+       if ((!s) || fstat(s->fd, &sbuf) ||
            !S_ISREG(sbuf.st_mode) ||
            (sbuf.st_mode & S_IWOTH))
                exit(ERR_UNK_ERROR); /* don't be verbose about security

Comment 1 Miloslav Trmač 2004-09-30 00:38:18 UTC
This is fixed in current version (usermode-1.70-2).
Thanks for your report.