To reproduce this bug the file must be in an OverlayFS mount. The following steps will create one and then demonstrate the bug.
On a host using linux-aws 4.4.0-1054 run the following reproduction steps:
Install packages libacl1-dev
, build-essential
, and gcc
.
Included is a C program that reproduces the bug and two scripts. Run them in order.
make-overlay.sh
: creates directories in /tmp and mounts /tmp/overlay as an overlay filesystemtest.sh
: compiles the c program and executes it. additionally attempts to read the file and checks its permissions after the program exits.