public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Siddhesh Poyarekar <siddhesh@sourceware.org>
Cc: libc-alpha@sourceware.org,  fweimer@redhat.com,  carlos@redhat.com
Subject: Re: [PATCH v2] getaddrinfo: Fix use after free in getcanonname (CVE-2023-4806)
Date: Thu, 14 Sep 2023 10:37:14 +0200	[thread overview]
Message-ID: <mvmsf7hw3ph.fsf@suse.de> (raw)
In-Reply-To: <20230913205628.3113433-1-siddhesh@sourceware.org> (Siddhesh Poyarekar's message of "Wed, 13 Sep 2023 16:56:28 -0400")

On Sep 13 2023, Siddhesh Poyarekar wrote:

> diff --git a/nss/tst-nss-gai-hv2-canonname.c b/nss/tst-nss-gai-hv2-canonname.c
> new file mode 100644
> index 0000000000..d5f10c07d6
> --- /dev/null
> +++ b/nss/tst-nss-gai-hv2-canonname.c
> @@ -0,0 +1,63 @@
> +/* Test NSS query path for plugins that only implement gethostbyname2
> +   (#30843).
> +   Copyright The GNU Toolchain Authors.
> +   This file is part of the GNU C Library.
> +
> +   The GNU C Library is free software; you can redistribute it and/or
> +   modify it under the terms of the GNU Lesser General Public
> +   License as published by the Free Software Foundation; either
> +   version 2.1 of the License, or (at your option) any later version.
> +
> +   The GNU C Library is distributed in the hope that it will be useful,
> +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> +   Lesser General Public License for more details.
> +
> +   You should have received a copy of the GNU Lesser General Public
> +   License along with the GNU C Library; if not, see
> +   <https://www.gnu.org/licenses/>.  */
> +
> +#include <nss.h>
> +#include <netdb.h>
> +#include <stdlib.h>
> +#include <string.h>
> +#include <support/check.h>
> +#include <support/xstdio.h>
> +#include "nss/tst-nss-gai-hv2-canonname.h"
> +
> +#define PREPARE do_prepare
> +
> +static void do_prepare (int a, char **av)
> +{
> +  FILE *hosts = xfopen ("/etc/hosts", "w");

Doesn't that mean the test needs to be run as root?

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

  reply	other threads:[~2023-09-14  8:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-13 17:36 [PATCH] " Siddhesh Poyarekar
2023-09-13 19:03 ` Florian Weimer
2023-09-13 20:56 ` [PATCH v2] " Siddhesh Poyarekar
2023-09-14  8:37   ` Andreas Schwab [this message]
2023-09-14  9:48     ` Siddhesh Poyarekar
2023-09-14  9:55       ` Andreas Schwab
2023-09-14  9:57         ` Siddhesh Poyarekar
2023-09-14 10:00           ` Andreas Schwab
2023-09-14 10:06             ` Siddhesh Poyarekar
2023-09-14 10:12               ` Andreas Schwab
2023-09-14 10:24                 ` Siddhesh Poyarekar
2023-09-14 10:13 ` [PATCH v3] " Siddhesh Poyarekar
2023-09-14 10:53   ` Florian Weimer
2023-09-14 11:27     ` Siddhesh Poyarekar
2023-09-14 22:52   ` Carlos O'Donell
2023-09-15 18:41 ` [COMMITTED] " Siddhesh Poyarekar

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=mvmsf7hw3ph.fsf@suse.de \
    --to=schwab@suse.de \
    --cc=carlos@redhat.com \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=siddhesh@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).