[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Where to report: root fails to edit other users file in sticky bit directory



Good idea, although it would have been recognised much earlier during nearly every normal system operation:
-------
root@micha:/tmp# set -o | grep noclobber
noclobber       off
-------

strace is a fantastic idea, but it seems to fail on the lowest level "EACCES (Permission denied)":
-------
root@VM-Bullseye:~# strace touch testdir/testfile
execve("/usr/bin/touch", ["touch", "testdir/testfile"], 0x7ffc117f64c8 /* 15 vars */) = 0
brk(NULL)                               = 0x562ade0be000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=10074, ...}) = 0
mmap(NULL, 10074, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd0797bd000
close(3)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@n\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1839792, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd0797bb000 mmap(NULL, 1852680, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fd0795f6000
mprotect(0x7fd07961b000, 1662976, PROT_NONE) = 0
mmap(0x7fd07961b000, 1355776, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x25000) = 0x7fd07961b000 mmap(0x7fd079766000, 303104, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x170000) = 0x7fd079766000 mmap(0x7fd0797b1000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1ba000) = 0x7fd0797b1000 mmap(0x7fd0797b7000, 13576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fd0797b7000
close(3)                                = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd0795f4000
arch_prctl(ARCH_SET_FS, 0x7fd0797bc5c0) = 0
mprotect(0x7fd0797b1000, 12288, PROT_READ) = 0
mprotect(0x562adcd52000, 4096, PROT_READ) = 0
mprotect(0x7fd0797ea000, 4096, PROT_READ) = 0
munmap(0x7fd0797bd000, 10074)           = 0
brk(NULL)                               = 0x562ade0be000
brk(0x562ade0df000)                     = 0x562ade0df000
openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1827600, ...}) = 0
mmap(NULL, 1827600, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd079435000
close(3)                                = 0
openat(AT_FDCWD, "testdir/testfile", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK, 0666) = -1 EACCES (Permission denied)
utimensat(AT_FDCWD, "testdir/testfile", NULL, 0) = 0
close(1)                                = 0
close(2)                                = 0
exit_group(0)                           = ?
+++ exited with 0 +++
-------

I disabled file system caching by remounting rootfs with "sync" option, but that didn't help either. Other file systems with UNIX permissions are outstanding: F2FS, Btrfs, XFS, NTFS with 3g driver, will try that as well.

I btw reported the issue to the testing list now, which seems to be the better place to report unspecific issues with Bullseye. Although the list is not very active :\. Let's see, my mail did not appear yet: https://lists.debian.org/debian-testing/2020/12/threads.html


Reply to: