Hide Forgot
Description of problem: Return value of getpwuid() should be checked before dereferencing. Version-Release number of selected component (if applicable): policycoreutils-2.0.83-19.1.el6 Additional info: Missing call of exit(1) in sepolgen-ifgen-attr-helper.c may cause a double free: /* Open the output policy. */ fp = fopen(argv[2], "w"); if (fp == NULL) { fprintf(stderr, "error opening output file\n"); policydb_destroy(p); free(p); } ... policydb_destroy(p); free(p); fclose(fp);
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. If you would like it considered as an exception in the current release, please ask your support representative.
Fixed in policycoreutils-2.0.83-33.3.fc13
Fixed in policycoreutils-2.0.83-33.3.el6
Fixed in policycoreutils-2.0.83-19.19.el6
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: The missing exit(1) function call in the underlying code of the sepolgen-ifgen utility could cause the restorecond daemon to access already freed memory when retrieving user's information. This would cause restorecond to terminate unexpectedly with a segmentation fault. With this update, restorecond has been modified to check the return value of the getpwuid() function to avoid this situation.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2012-0969.html