APPLIED: [PATCH 0/1][SRU][Disco] shiftfs: fix passing of attrs to underaly for setattr
Seth Forshee
seth.forshee at canonical.com
Sun Apr 14 18:12:52 UTC 2019
On Sun, Apr 14, 2019 at 10:44:21AM -0500, Seth Forshee wrote:
> https://bugs.launchpad.net/bugs/1824717
>
> SRU Justification
>
> Impact: It is possible to hit a BUG statement in notify_change() with
> shiftfs. This occurs when one of ATTR_KILL_SUID or ATTR_KILL_SGID is set
> in the attrs and notify_change() sets ATTR_MODE before calling
> shiftfs_setattr(). shiftfs_setattr() passes the attrs to
> notify_change(), and the BUG statement is hit due to ATTR_MODE being set
> with one of ATTR_KILL_SUID or ATTR_KILL_SGID set.
>
> Fix: Copy the logic used by ecryptfs and overlayfs to clear ATTR_MODE if
> one of these bits is set, allowing the lower fs to interpret the kill
> bits in its own way. Also fix a bug where changes to the attrs from
> setattr_prepare() are not propagated to the attrs used for the lower fs.
>
> Regression Potential: Limited to shiftfs, matches the behavior of other
> stacked filesystems, and has been tested (see below).
>
> Test Case: Tested in the lxd CI environment where the bug was originally
> discovered. No regressions were seen, and the BUG statement was not hit.
Applied to disco/master-next.
More information about the kernel-team
mailing list