Re: file system permissions regression affecting root

2020-05-13 Thread Patrick Donnelly
On Wed, May 13, 2020 at 9:11 AM Al Viro wrote: > > On Wed, May 13, 2020 at 08:00:28AM -0700, Patrick Donnelly wrote: > > In newer kernels (at least 5.6), it appears root is not able to write > > to files owned by other users in a sticky directory: > > Yes. Co

file system permissions regression affecting root

2020-05-13 Thread Patrick Donnelly
Change: 2020-05-13 07:55:18.892599600 -0700 Birth: 2020-05-13 07:55:18.892599600 -0700 $ sudo strace -f -- /bin/sh -c 'echo 1 > gtmp/foo' |& grep foo execve("/bin/sh", ["/bin/sh", "-c", "echo 1 > gtmp/foo"], 0x7fff588732f0 /* 15 vars */) = 0 openat(AT_FDCWD, "gtmp/foo", O_WRONLY|O_CREAT|O_TRUNC, 0666) = -1 EACCES (Permission denied) write(2, "/bin/sh: gtmp/foo: Permission de"..., 37/bin/sh: gtmp/foo: Permission denied -- Patrick Donnelly

Re: Question regarding ptrace work for LInux v3.1

2016-03-23 Thread Patrick Donnelly
On Mon, Mar 21, 2016 at 3:35 PM, Oleg Nesterov wrote: > On 03/21, Patrick Donnelly wrote: >> On Mon, Mar 21, 2016 at 3:07 PM, Oleg Nesterov wrote: >> > case SIGSTOP: >> > /* Black magic to get threads working on old Linux kernels... */ >> &g

Re: Question regarding ptrace work for LInux v3.1

2016-03-21 Thread Patrick Donnelly
On Mon, Mar 21, 2016 at 3:07 PM, Oleg Nesterov wrote: > On 03/21, Patrick Donnelly wrote: >> >> That seems to be the case but it will only report certain events (not >> syscalls). I have observed PTRACE_EVENT_EXIT and PTRACE_EVENT_CLONE >> events... Hmm, now that I th

Re: Question regarding ptrace work for LInux v3.1

2016-03-21 Thread Patrick Donnelly
v3.1 so it seems > there is something else. Okay, it might be that PTRACE_SEIZE fixes it. > It would be nice to have a test-case :/ Unfortunately, I have not yet been able to isolate a test case. Thanks for your help! -- Patrick Donnelly

Re: [PATCH 0/7] userfault21 update

2015-10-20 Thread Patrick Donnelly
On Mon, Oct 19, 2015 at 5:42 PM, Andrea Arcangeli wrote: > Hello Patrick, > > On Mon, Oct 12, 2015 at 11:04:11AM -0400, Patrick Donnelly wrote: >> Hello Andrea, >> >> On Mon, Jun 15, 2015 at 1:22 PM, Andrea Arcangeli >> wrote: >> > This is an increme

Re: [PATCH 0/7] userfault21 update

2015-10-12 Thread Patrick Donnelly
uffd_msg be sufficient to disambiguate faults? -- Patrick Donnelly -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH v4] tty: add missing rcu_read_lock for task_pgrp

2015-07-12 Thread Patrick Donnelly
task_pgrp requires an rcu or tasklist lock to be obtained if the returned pid is to be dereferenced, which kill_pgrp does. Obtain an RCU lock for the duration of use. Signed-off-by: Patrick Donnelly --- drivers/tty/n_tty.c | 15 --- drivers/tty/tty_io.c | 17 - 2

Re: [PATCH v3] tty: add missing rcu_read_lock for task_pgrp

2015-07-12 Thread Patrick Donnelly
On Sat, Jul 11, 2015 at 10:05 PM, Peter Hurley wrote: > I just realized there's a missing rcu_read_unlock() from this early return. Nice catch. I'll send a new series out... -- Patrick Donnelly -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" i

[PATCH v3] tty: add missing rcu_read_lock for task_pgrp

2015-06-29 Thread Patrick Donnelly
task_pgrp requires an rcu or tasklist lock to be obtained if the returned pid is to be dereferenced, which kill_pgrp does. Obtain an RCU lock for the duration of use. Signed-off-by: Patrick Donnelly --- drivers/tty/n_tty.c | 12 ++-- drivers/tty/tty_io.c | 17 - 2 files

Re: [PATCH v2 1/2] tty: add missing rcu_read_lock for task_pgrp

2015-06-29 Thread Patrick Donnelly
well (in a > follow-on > patch?) I don't follow what you're referring to. Is it these lines? if (!tty->pgrp) { printk(KERN_WARNING "tty_check_change: tty->pgrp == NULL!\n"); -- Patrick Donnelly -- To unsubscribe from this list: send the line "unsub

Re: [PATCH v2 2/2] tty: check tcsetpgrp p is a process group

2015-06-28 Thread Patrick Donnelly
On Sun, Jun 28, 2015 at 12:07 PM, Peter Hurley wrote: > On 06/27/2015 08:51 PM, Patrick Donnelly wrote: >> This fixes a bug where a process can set the foreground process group to its >> pid even if its pid is not a valid pgrp. >> >> Signed-off-by: Patrick Donne

Re: [PATCH v2 1/2] tty: add missing rcu_read_lock for task_pgrp

2015-06-28 Thread Patrick Donnelly
On Sun, Jun 28, 2015 at 11:23 AM, Peter Hurley wrote: > On 06/27/2015 08:51 PM, Patrick Donnelly wrote: >> task_pgrp requires an rcu or tasklist lock to be obtained if the returned pid >> is to be dereferenced, which kill_pgrp does. Obtain an RCU lock for the >> duration

Re: [PATCH 2/2] Check tcsetpgrp p is a process group.

2015-06-27 Thread Patrick Donnelly
On Sat, Jun 27, 2015 at 7:26 PM, Greg Kroah-Hartman wrote: > On Sat, Jun 27, 2015 at 05:17:03PM -0400, Patrick Donnelly wrote: >> This fixes a bug where a process can set the foreground process group to its >> pid even if its pid is not a valid pgrp. >> >> Sign

[PATCH v2 1/2] tty: add missing rcu_read_lock for task_pgrp

2015-06-27 Thread Patrick Donnelly
task_pgrp requires an rcu or tasklist lock to be obtained if the returned pid is to be dereferenced, which kill_pgrp does. Obtain an RCU lock for the duration of use. Signed-off-by: Patrick Donnelly --- drivers/tty/tty_io.c | 24 +++- 1 file changed, 15 insertions(+), 9

[PATCH v2 2/2] tty: check tcsetpgrp p is a process group

2015-06-27 Thread Patrick Donnelly
This fixes a bug where a process can set the foreground process group to its pid even if its pid is not a valid pgrp. Signed-off-by: Patrick Donnelly --- drivers/tty/tty_io.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index fbb55db

[PATCH 2/2] Check tcsetpgrp p is a process group.

2015-06-27 Thread Patrick Donnelly
This fixes a bug where a process can set the foreground process group to its pid even if its pid is not a valid pgrp. Signed-off-by: Patrick Donnelly --- drivers/tty/tty_io.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c

[PATCH 1/2] Add missing rcu_read_lock for task_pgrp.

2015-06-27 Thread Patrick Donnelly
Signed-off-by: Patrick Donnelly --- drivers/tty/tty_io.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 57fc6ee..401d05e 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -388,33 +388,40