public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Martin Doucha <mdoucha@suse.cz>
Cc: ltp@lists.linux.it, David Hildenbrand <david@redhat.com>
Subject: Re: [LTP] [PATCH v2] security/dirtyc0w_shmem: Add new test for CVE-2022-2590
Date: Fri, 25 Nov 2022 11:06:38 +0100	[thread overview]
Message-ID: <Y4CTrrCb4jtQay9y@pevik> (raw)
In-Reply-To: <8587b908-a035-a96a-7233-2863b7bc30ca@suse.cz>

Hi Martin,

> Hi,

> On 23. 11. 22 11:35, David Hildenbrand wrote:
> > +	pid = SAFE_FORK();
> > +	if (!pid) {
> > +		SAFE_SETGID(nobody_gid);
> > +		SAFE_SETUID(nobody_uid);
> > +		SAFE_EXECLP("dirtyc0w_shmem_child", "dirtyc0w_shmem_child", NULL);

> Manpage says that the last argument of execlp() must be (char*)NULL,
> including the explicit typecast.
I was too fast here (already merged).

You're right, although we use execlp() or SAFE_EXECLP with just NULL on many
places, including testing execlp() itself in execlp01.c. I guess we should fix
that.

> > +#else /* UFFD_FEATURE_MINOR_SHMEM */
> > +#include "tst_test.h"
> > +TST_TEST_TCONF("System does not have userfaultfd minor fault support for shmem");
> > +#endif /* UFFD_FEATURE_MINOR_SHMEM */

> When the child exits through this TST_TEST_TCONF(), the
> TST_CHECKPOINT_WAIT() in parent will fail. The parent process should not
> even fork() when UFFD_FEATURE_MINOR_SHMEM is not defined in config.h.
+1, this should be fixed. Please let us know if you don't have time to send fix
yourself.

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2022-11-25 10:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-23 10:35 [LTP] [PATCH v2] security/dirtyc0w_shmem: Add new test for CVE-2022-2590 David Hildenbrand
2022-11-24 22:13 ` Petr Vorel
2022-11-25  9:53 ` Martin Doucha
2022-11-25 10:06   ` Petr Vorel [this message]
2022-11-25 10:20     ` David Hildenbrand
2022-11-25 10:25       ` Martin Doucha
2022-11-25 10:29         ` David Hildenbrand
2022-11-25 10:39           ` Petr Vorel
2022-11-25 10:42             ` David Hildenbrand
2022-11-25 10:17   ` David Hildenbrand
2022-11-25 14:22   ` Cyril Hrubis
2022-11-25 14:26     ` Martin Doucha
2022-11-25 14:35       ` Cyril Hrubis
2022-11-25 10:37 ` Martin Doucha
2022-11-25 10:39   ` Petr Vorel
2022-11-25 10:40     ` David Hildenbrand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y4CTrrCb4jtQay9y@pevik \
    --to=pvorel@suse.cz \
    --cc=david@redhat.com \
    --cc=ltp@lists.linux.it \
    --cc=mdoucha@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox