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: <87cykrancy.fsf@email.froward.int.ebiederm.org>
Date: Wed, 25 Sep 2024 08:12:29 -0500
From: "Eric W. Biederman" <ebiederm@...ssion.com>
To: Tycho Andersen <tycho@...ho.pizza>
Cc: Kees Cook <kees@...nel.org>,  Alexander Viro <viro@...iv.linux.org.uk>,
  Christian Brauner <brauner@...nel.org>,  Jan Kara <jack@...e.cz>,  Jeff
 Layton <jlayton@...nel.org>,  Chuck Lever <chuck.lever@...cle.com>,
  Alexander Aring <alex.aring@...il.com>,  linux-fsdevel@...r.kernel.org,
  linux-mm@...ck.org,  linux-kernel@...r.kernel.org,  Tycho Andersen
 <tandersen@...flix.com>,  Zbigniew Jędrzejewski-Szmek
 <zbyszek@...waw.pl>,
  Aleksa Sarai <cyphar@...har.com>
Subject: Re: [RFC] exec: add a flag for "reasonable" execveat() comm

Tycho Andersen <tycho@...ho.pizza> writes:

> Yeah, on second thought we could do something like:
>
> diff --git a/fs/exec.c b/fs/exec.c
> index 36434feddb7b..a45ea270cc43 100644
> --- a/fs/exec.c
> +++ b/fs/exec.c
> @@ -1416,7 +1416,10 @@ int begin_new_exec(struct linux_binprm * bprm)
>                 set_dumpable(current->mm, SUID_DUMP_USER);
>
>         perf_event_exec();
> -       __set_task_comm(me, kbasename(bprm->filename), true);
> +       if (needs_comm_fixup)
> +               __set_task_comm(me, argv0, true);
                                  ^^^^^ nit: make that kbasename(argv0)

The typical case is for applications to use the filename as argv0,
at which point the directories in the pathname are just noise.

With only 16 characters in TASK_COMM we want to keep the noise down.

Eric

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ