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: <87v932ar5q.fsf@disp2133>
Date:   Wed, 15 Sep 2021 08:45:37 -0500
From:   ebiederm@...ssion.com (Eric W. Biederman)
To:     Sasha Levin <sashal@...nel.org>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Ohhoon Kwon <ohoono.kwon@...sung.com>,
        Ingo Molnar <mingo@...nel.org>,
        "David S . Miller" <davem@...emloft.net>,
        Christian Brauner <christian.brauner@...ntu.com>,
        Alexey Dobriyan <adobriyan@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH AUTOSEL 5.14 19/25] connector: send event on write to /proc/[pid]/comm

Sasha Levin <sashal@...nel.org> writes:

> From: Ohhoon Kwon <ohoono.kwon@...sung.com>
>
> [ Upstream commit c2f273ebd89a79ed87ef1025753343e327b99ac9 ]
>
> While comm change event via prctl has been reported to proc connector by
> 'commit f786ecba4158 ("connector: add comm change event report to proc
> connector")', connector listeners were missing comm changes by explicit
> writes on /proc/[pid]/comm.
>
> Let explicit writes on /proc/[pid]/comm report to proc connector.

This is a potential userspace ABI breakage?  Why backport it?

Especially if there is no one asking for the behavior change in
userspace?

Eric


>
> Link: https://lkml.kernel.org/r/20210701133458epcms1p68e9eb9bd0eee8903ba26679a37d9d960@epcms1p6
> Signed-off-by: Ohhoon Kwon <ohoono.kwon@...sung.com>
> Cc: Ingo Molnar <mingo@...nel.org>
> Cc: David S. Miller <davem@...emloft.net>
> Cc: Christian Brauner <christian.brauner@...ntu.com>
> Cc: Eric W. Biederman <ebiederm@...ssion.com>
> Cc: Alexey Dobriyan <adobriyan@...il.com>
> Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
> Signed-off-by: Linus Torvalds <torvalds@...ux-foundation.org>
> Signed-off-by: Sasha Levin <sashal@...nel.org>
> ---
>  fs/proc/base.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/fs/proc/base.c b/fs/proc/base.c
> index e5b5f7709d48..533d5836eb9a 100644
> --- a/fs/proc/base.c
> +++ b/fs/proc/base.c
> @@ -95,6 +95,7 @@
>  #include <linux/posix-timers.h>
>  #include <linux/time_namespace.h>
>  #include <linux/resctrl.h>
> +#include <linux/cn_proc.h>
>  #include <trace/events/oom.h>
>  #include "internal.h"
>  #include "fd.h"
> @@ -1674,8 +1675,10 @@ static ssize_t comm_write(struct file *file, const char __user *buf,
>  	if (!p)
>  		return -ESRCH;
>  
> -	if (same_thread_group(current, p))
> +	if (same_thread_group(current, p)) {
>  		set_task_comm(p, buffer);
> +		proc_comm_connector(p);
> +	}
>  	else
>  		count = -EINVAL;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ