Bug 887010 (CVE-2012-5638) - CVE-2012-5638 sanlock world writable /var/log/sanlock.log
Summary: CVE-2012-5638 sanlock world writable /var/log/sanlock.log
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2012-5638
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 849181 887114
Blocks: 886367 887012
TreeView+ depends on / blocked
 
Reported: 2012-12-13 20:08 UTC by Kurt Seifried
Modified: 2023-05-12 19:01 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-22 02:49:24 UTC
Embargoed:


Attachments (Terms of Use)
proposed patch (1.39 KB, patch)
2012-12-24 21:28 UTC, Martin Quinson
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0691 0 normal SHIPPED_LIVE Important: Red Hat Storage 2.0 security, bug fix, and enhancement update #4 2013-03-29 02:21:19 UTC

Description Kurt Seifried 2012-12-13 20:08:03 UTC
The sanlock server creates the /var/log/sanlock.log world writable allowing 
any one on the system to wipe the contents of the log file or to store data 
within the log file (bypassing any quotas applied to their account). The 
affected code is:

src/log.h

int setup_logging(void)
{
        int fd, rv;
        snprintf(logfile_path, PATH_MAX, "%s/%s", SANLK_LOG_DIR,
                 SANLK_LOGFILE_NAME);
        logfile_fp = fopen(logfile_path, "a+");

Comment 2 Martin Quinson 2012-12-24 21:28:22 UTC
Created attachment 668606 [details]
proposed patch

This is just a starting
point, as I was not able to test the patch myself. Also, I used 660 as
permissions to the file, I'm not sure of whether it's sensible or not.

Please review and test before applying.

Comment 3 David Teigland 2013-01-02 16:28:29 UTC
This problem was fixed in bug 849181.

Comment 4 Murray McAllister 2013-03-28 02:03:57 UTC
Acknowledgements:

This issue was discovered by Red Hat.

Comment 5 errata-xmlrpc 2013-03-28 22:28:15 UTC
This issue has been addressed in following products:

  Red Hat Storage 2.0
  Red Hat Storage 2.0 Console
  Native Client for RHEL 5 for Red Hat Storage
  Native Client for RHEL 6 for Red Hat Storage

Via RHSA-2013:0691 https://rhn.redhat.com/errata/RHSA-2013-0691.html


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