Bug 59080 - doing: userhelper -w /// will cause SEGV
Summary: doing: userhelper -w /// will cause SEGV
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: usermode
Version: 7.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jindrich Novy
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-01-30 17:43 UTC by Luki Rustianto
Modified: 2013-07-02 22:55 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-09-30 00:38:18 UTC
Embargoed:


Attachments (Terms of Use)

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.


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