lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dc48b40748e24d3799e7ee66fa7e8cb4@AcuMS.aculab.com>
Date:   Fri, 28 Jul 2023 08:43:58 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Aleksa Sarai' <cyphar@...har.com>,
        Alexey Gladkov <legion@...nel.org>
CC:     LKML <linux-kernel@...r.kernel.org>, Arnd Bergmann <arnd@...db.de>,
        "linux-api@...r.kernel.org" <linux-api@...r.kernel.org>,
        "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
        "viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>,
        "James.Bottomley@...senpartnership.com" 
        <James.Bottomley@...senpartnership.com>,
        "acme@...nel.org" <acme@...nel.org>,
        "alexander.shishkin@...ux.intel.com" 
        <alexander.shishkin@...ux.intel.com>,
        "axboe@...nel.dk" <axboe@...nel.dk>,
        "benh@...nel.crashing.org" <benh@...nel.crashing.org>,
        "borntraeger@...ibm.com" <borntraeger@...ibm.com>,
        "bp@...en8.de" <bp@...en8.de>,
        "catalin.marinas@....com" <catalin.marinas@....com>,
        "christian@...uner.io" <christian@...uner.io>,
        "dalias@...c.org" <dalias@...c.org>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "deepa.kernel@...il.com" <deepa.kernel@...il.com>,
        "deller@....de" <deller@....de>,
        "dhowells@...hat.com" <dhowells@...hat.com>,
        "fenghua.yu@...el.com" <fenghua.yu@...el.com>,
        "fweimer@...hat.com" <fweimer@...hat.com>,
        "geert@...ux-m68k.org" <geert@...ux-m68k.org>,
        "glebfm@...linux.org" <glebfm@...linux.org>,
        "gor@...ux.ibm.com" <gor@...ux.ibm.com>,
        "hare@...e.com" <hare@...e.com>, "hpa@...or.com" <hpa@...or.com>,
        "ink@...assic.park.msu.ru" <ink@...assic.park.msu.ru>,
        "jhogan@...nel.org" <jhogan@...nel.org>,
        "kim.phillips@....com" <kim.phillips@....com>,
        "ldv@...linux.org" <ldv@...linux.org>,
        "linux-alpha@...r.kernel.org" <linux-alpha@...r.kernel.org>,
        "linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
        "linux-ia64@...r.kernel.org" <linux-ia64@...r.kernel.org>,
        "linux-m68k@...ts.linux-m68k.org" <linux-m68k@...ts.linux-m68k.org>,
        "linux-mips@...r.kernel.org" <linux-mips@...r.kernel.org>,
        "linux-parisc@...r.kernel.org" <linux-parisc@...r.kernel.org>,
        "linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
        "linux-sh@...r.kernel.org" <linux-sh@...r.kernel.org>,
        "linux@...linux.org.uk" <linux@...linux.org.uk>,
        "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
        "luto@...nel.org" <luto@...nel.org>,
        "mattst88@...il.com" <mattst88@...il.com>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "monstr@...str.eu" <monstr@...str.eu>,
        "mpe@...erman.id.au" <mpe@...erman.id.au>,
        "namhyung@...nel.org" <namhyung@...nel.org>,
        "paulus@...ba.org" <paulus@...ba.org>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "ralf@...ux-mips.org" <ralf@...ux-mips.org>,
        "sparclinux@...r.kernel.org" <sparclinux@...r.kernel.org>,
        "stefan@...er.ch" <stefan@...er.ch>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "tony.luck@...el.com" <tony.luck@...el.com>,
        "tycho@...ho.ws" <tycho@...ho.ws>,
        "will@...nel.org" <will@...nel.org>,
        "x86@...nel.org" <x86@...nel.org>,
        "ysato@...rs.sourceforge.jp" <ysato@...rs.sourceforge.jp>,
        Palmer Dabbelt <palmer@...ive.com>
Subject: RE: [PATCH v4 2/5] fs: Add fchmodat2()

...
> FWIW, I agree with Christian that these behaviours are not ideal (and
> I'm working on a series that might allow for these things to be properly
> blocked in the future) but there's also the consistency argument -- I
> don't think fchownat() is much safer to allow in this way than
> fchmodat() and (again) this behaviour is already possible through
> procfs.

If the 'through procfs' involves readlink("/proc/self/fd/n") and
accessing through the returned path then the permission checks
are different.
Using the returned path requires search permissions on all the
directories.

This is all fine for xxxat() functions where a real open
directory fd is supplied.
But other cases definitely need a lot of thought to ensure
they don't let programs acquire permissions they aren't
supposed to have.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ