Bug 14913
Summary: | POSIX capability CAP_DAC_READ_SEARCH does not bypass filesystem permissions | ||
---|---|---|---|
Product: | Other | Reporter: | Mike Kazantsev (mk.fraggod) |
Component: | Other | Assignee: | other_other |
Status: | RESOLVED PATCH_ALREADY_AVAILABLE | ||
Severity: | normal | CC: | mk.fraggod |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.32.1, 2.6.32.2, 2.6.33-rc2 | Subsystem: | |
Regression: | Yes | Bisected commit-id: | |
Attachments: |
Simple open() test
Patch to fix the problem (works with at least 2.6.32.2 and 2.6.33-rc2) |
Description
Mike Kazantsev
2009-12-28 10:34:20 UTC
Created attachment 24342 [details]
Patch to fix the problem (works with at least 2.6.32.2 and 2.6.33-rc2)
Versions lesser than 2.6.32 are unaffected by the bug, so it looks like a regression. Serge E. Hallyn has already fixed the issue, providing the attached patch (see the discussion thread in the original post). From the patch itself: Subject: [PATCH 1/1] generic_permission: MAY_OPEN is not write access generic_permission was refusing CAP_DAC_READ_SEARCH-enabled processes from opening DAC-protected files read-only, because do_filp_open adds MAY_OPEN to the open mask. Ignore MAY_OPEN. After this patch, CAP_DAC_READ_SEARCH is again sufficient to open(fname, O_RDONLY) on a file to which DAC otherwise refuses us read permission. |