RE: [PATCH v4 2/5] fs: Add fchmodat2()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: "'Aleksa Sarai'" <cyphar@xxxxxxxxxx>, Alexey Gladkov <legion@xxxxxxxxxx>
- Subject: RE: [PATCH v4 2/5] fs: Add fchmodat2()
- From: David Laight <David.Laight@xxxxxxxxxx>
- Date: Thu, 27 Jul 2023 09:01:06 +0000
- Accept-language: en-GB, en-US
- Cc: LKML <linux-kernel@xxxxxxxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, "linux-api@xxxxxxxxxxxxxxx" <linux-api@xxxxxxxxxxxxxxx>, "linux-fsdevel@xxxxxxxxxxxxxxx" <linux-fsdevel@xxxxxxxxxxxxxxx>, "viro@xxxxxxxxxxxxxxxxxx" <viro@xxxxxxxxxxxxxxxxxx>, "James.Bottomley@xxxxxxxxxxxxxxxxxxxxx" <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>, "acme@xxxxxxxxxx" <acme@xxxxxxxxxx>, "alexander.shishkin@xxxxxxxxxxxxxxx" <alexander.shishkin@xxxxxxxxxxxxxxx>, "axboe@xxxxxxxxx" <axboe@xxxxxxxxx>, "benh@xxxxxxxxxxxxxxxxxxx" <benh@xxxxxxxxxxxxxxxxxxx>, "borntraeger@xxxxxxxxxx" <borntraeger@xxxxxxxxxx>, "bp@xxxxxxxxx" <bp@xxxxxxxxx>, "catalin.marinas@xxxxxxx" <catalin.marinas@xxxxxxx>, "christian@xxxxxxxxxx" <christian@xxxxxxxxxx>, "dalias@xxxxxxxx" <dalias@xxxxxxxx>, "davem@xxxxxxxxxxxxx" <davem@xxxxxxxxxxxxx>, "deepa.kernel@xxxxxxxxx" <deepa.kernel@xxxxxxxxx>, "deller@xxxxxx" <deller@xxxxxx>, "dhowells@xxxxxxxxxx" <dhowells@xxxxxxxxxx>, "fenghua.yu@xxxxxxxxx" <fenghua.yu@xxxxxxxxx>, "fweimer@xxxxxxxxxx" <fweimer@xxxxxxxxxx>, "geert@xxxxxxxxxxxxxx" <geert@xxxxxxxxxxxxxx>, "glebfm@xxxxxxxxxxxx" <glebfm@xxxxxxxxxxxx>, "gor@xxxxxxxxxxxxx" <gor@xxxxxxxxxxxxx>, "hare@xxxxxxxx" <hare@xxxxxxxx>, "hpa@xxxxxxxxx" <hpa@xxxxxxxxx>, "ink@xxxxxxxxxxxxxxxxxxxx" <ink@xxxxxxxxxxxxxxxxxxxx>, "jhogan@xxxxxxxxxx" <jhogan@xxxxxxxxxx>, "kim.phillips@xxxxxxx" <kim.phillips@xxxxxxx>, "ldv@xxxxxxxxxxxx" <ldv@xxxxxxxxxxxx>, "linux-alpha@xxxxxxxxxxxxxxx" <linux-alpha@xxxxxxxxxxxxxxx>, "linux-arch@xxxxxxxxxxxxxxx" <linux-arch@xxxxxxxxxxxxxxx>, "linux-ia64@xxxxxxxxxxxxxxx" <linux-ia64@xxxxxxxxxxxxxxx>, "linux-m68k@xxxxxxxxxxxxxxxxxxxx" <linux-m68k@xxxxxxxxxxxxxxx>, "linux-mips@xxxxxxxxxxxxxxx" <linux-mips@xxxxxxxxxxxxxxx>, "linux-parisc@xxxxxxxxxxxxxxx" <linux-parisc@xxxxxxxxxxxxxxx>, "linux-s390@xxxxxxxxxxxxxxx" <linux-s390@xxxxxxxxxxxxxxx>, "linux-sh@xxxxxxxxxxxxxxx" <linux-sh@xxxxxxxxxxxxxxx>, "linux@xxxxxxxxxxxxxxx" <linux@xxxxxxxxxxxxxxx>, "linuxppc-dev@xxxxxxxxxxxxxxxx" <linuxppc-dev@xxxxxxxxxxxxxxxx>, "luto@xxxxxxxxxx" <luto@xxxxxxxxxx>, "mattst88@xxxxxxxxx" <mattst88@xxxxxxxxx>, "mingo@xxxxxxxxxx" <mingo@xxxxxxxxxx>, "monstr@xxxxxxxxx" <monstr@xxxxxxxxx>, "mpe@xxxxxxxxxxxxxx" <mpe@xxxxxxxxxxxxxx>, "namhyung@xxxxxxxxxx" <namhyung@xxxxxxxxxx>, "paulus@xxxxxxxxx" <paulus@xxxxxxxxx>, "peterz@xxxxxxxxxxxxx" <peterz@xxxxxxxxxxxxx>, "ralf@xxxxxxxxxxxxxx" <ralf@xxxxxxxxxxxxxx>, "sparclinux@xxxxxxxxxxxxxxx" <sparclinux@xxxxxxxxxxxxxxx>, "stefan@xxxxxxxx" <stefan@xxxxxxxx>, "tglx@xxxxxxxxxxxxx" <tglx@xxxxxxxxxxxxx>, "tony.luck@xxxxxxxxx" <tony.luck@xxxxxxxxx>, "tycho@xxxxxxxx" <tycho@xxxxxxxx>, "will@xxxxxxxxxx" <will@xxxxxxxxxx>, "x86@xxxxxxxxxx" <x86@xxxxxxxxxx>, "ysato@xxxxxxxxxxxxxxxxxxxx" <ysato@xxxxxxxxxxxxx>, Palmer Dabbelt <palmer@xxxxxxxxxx>
- In-reply-to: <njnhwhgmsk64e6vf3ur7fifmxlipmzez3r5g7ejozsrkbwvq7w@tu7w3ieystcq>
- References: <cover.1689074739.git.legion@kernel.org> <cover.1689092120.git.legion@kernel.org> <f2a846ef495943c5d101011eebcf01179d0c7b61.1689092120.git.legion@kernel.org> <njnhwhgmsk64e6vf3ur7fifmxlipmzez3r5g7ejozsrkbwvq7w@tu7w3ieystcq>
From: Aleksa Sarai
> Sent: 25 July 2023 17:36
...
> We almost certainly want to support AT_EMPTY_PATH at the same time.
> Otherwise userspace will still need to go through /proc when trying to
> chmod a file handle they have.
That can't be allowed.
Just because a process has a file open and write access to
the directory that contains it doesn't mean they are allowed
to change the file permissions.
They also need directory search access from a directory
they have open through to the containing directory.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]