SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. To reproduce this bug the file must be in an OverlayFS mount
  2.  
  3. Reproduced on:
  4. - linux-image-4.4.0-159-generic/xenial-updates,xenial-security,now 4.4.0-159.187 amd64
  5. - linux-image-4.4.0-165-generic/xenial-updates,xenial-security,now 4.4.0-165.193 amd64
  6.  
  7. Install packages `libacl1-dev`, `build-essential`, and `gcc`.
  8.  
  9. Included is a C program that reproduces the bug and two scripts. Run them in order.
  10. - `make-overlay.sh`: creates directories in /tmp and mounts /tmp/overlay as an overlay filesystem
  11. - `test.sh`: compiles the c program and executes it. additionally attempts to read the file and checks its permissions after the program exits.
  12.  
  13. Output:
  14. ```bash
  15. ubuntu@:~/ctr$ ./make-overlay.sh
  16. ubuntu@:~/ctr$ ./test.sh
  17. st_mode is 100644
  18. open failed: -1
  19. cat: /tmp/overlay/animal: Permission denied
  20. -rw-r--r-- 1 ubuntu ubuntu 0 Oct  4 19:40 /tmp/overlay/animal
  21. ```
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top