Hello Alon,

Thanx for the report.
But let me make sure a few details.

Alon Zahavi:
> For example - AWS EC2 Ubuntu 20.04 with aufs-tools installed.
>
>    1. Mount a device to any folder.
>    2. Copy any file with capabilities into that folder.
>    3. Remount the device now with nosuid and ro options.
>    4. mount a AUFS mount where there are two branches. Make sure the
>    "lower" branch is the branch with the capable file.
>
> Execution:
>
>    1. As a low-priv user cd into the AUFS root.
>    2. Execute mv capable_file _cp_capble_file
>    3. cd to the higher branch directory.
>    4. Execute the capable binary.
>
> Expected Results:
>
> When copying a capable file using a low privileged user, the file should be
> copied without any file capabilities.

In the 2nd step in Execution, should "mv" loose the file capability?  It
should be kept, isn't it?
If you tried "cp" instead of "mv, then the file capability should be
dropped.
Am I wrong?

Anyway, I think there is a problem in aufs since "cp" seems to keep the
file capability as you posted.  I am still trying to understand the
details now.


J. R. Okajima

Reply via email to