** Description changed:

  `chmod -R` changes entries below its command-line argument with a raw
  `syscall(SYS_fchmodat2, ...)` instead of a libc call, so `LD_PRELOAD`
  tools (fakeroot, fakechroot, pseudo) never see it. The mode changes on
  disk, but their bookkeeping does not, so later `stat()` calls report the
  old mode. Exit status is 0 and stderr is empty, so the loss is silent
  
  This can be reproduced by running the following commands using uutils
  0.10.0, fakeroot 1.37.1.2, Linux 6.16:
  
  ```sh
  mkdir -p d/sub
  fakeroot sh -c 'chown -R daemon:daemon d && chmod -R u+s d && find d -printf 
"%M %p\n" | sort'
  ```
  
  GNU coreutils:
  
  ```sh
  drwsrwxr-x d
  drwsrwxr-x d/sub
  ```
  
  uutils:
  
  ```sh
  drwsrwxr-x d
  drwxrwxr-x d/sub     # setuid bit lost
  ```
  
  This is an upstream bug introduced in the following commit:
- 
https://github.com/uutils/coreutils/commit/fe9420b8f07b1e6fee7462663221392f985d356e
+ 
https://github.com/uutils/coreutils/commit/b195b1de88283b9bc3ffaa88eaf9e012dbb6538c

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2164536

Title:
  chmod -R: raw fchmodat2 syscall bypasses libc, breaking LD_PRELOAD
  tools

To manage notifications about this bug go to:
https://bugs.launchpad.net/rust-coreutils/+bug/2164536/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to