public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Carlos O'Donell <carlos@redhat.com>
To: Florian Weimer <fweimer@redhat.com>, libc-alpha@sourceware.org
Subject: Re: [PATCH 00/11] Fix fgetsgent_r data corruption bug (20338)
Date: Mon, 20 Jul 2020 23:27:32 -0400	[thread overview]
Message-ID: <513f6b26-4509-78ec-bdb0-a18fd9162764@redhat.com> (raw)
In-Reply-To: <cover.1594974444.git.fweimer@redhat.com>

On 7/17/20 4:29 AM, Florian Weimer via Libc-alpha wrote:
> We have recently seen an uptick in reports of this bug.
> 
> The __libc_readline_unlocked removal and the nss_compat mmap fix for bug
> 26258 could potentially be dropped from this series.
> 
> Tested on i686-linux-gnu.  I verified that the test case crashes with
> glibc 2.31 on both i686 and x86-64, and not just results in failures
> under valgrind.

OK for 2.32.

Thanks for undertaking the refactor and the fix. The end result looks
much better than the existing code and uses a lot of the same functionality
but just organized better.

I tested on x86_64 and i686 also and I didn't see any failures.

Thanks for testing under valgrind which is also important.

This series is OK for 2.32 to fix the underlying bug 20338 which has
started to get visibility as it impacts systemd users.
 
> Thanks,
> Florian
> 
> Florian Weimer (11):
>   nss_files: Consolidate file opening in __nss_files_fopen
>   nss_compat: Do not use mmap to read database files (bug 26258)
>   nss_files: Consolidate line parse declarations in <nss_files.h>
>   nss_files: Use generic result pointer in parse_line
>   libio: Add fseterr_unlocked for internal use
>   nss: Add __nss_fgetent_r
>   grp: Implement fgetgrent_r using __nss_fgetent_r
>   gshadow: Implement fgetsgent_r using __nss_fgetent_r (bug 20338)
>   pwd: Implement fgetpwent_r using __nss_fgetent_r
>   shadow: Implement fgetspent_r using __nss_fgetent_r
>   libio: Remove __libc_readline_unlocked
> 
>  grp/fgetgrent_r.c                  |  54 +------
>  gshadow/Makefile                   |   2 +-
>  gshadow/fgetsgent_r.c              |  41 +----
>  gshadow/tst-fgetsgent_r.c          | 192 +++++++++++++++++++++++
>  include/grp.h                      |   6 -
>  include/gshadow.h                  |   6 -
>  include/netdb.h                    |  13 --
>  include/netinet/ether.h            |   6 -
>  include/nss_files.h                |  84 ++++++++++
>  include/pwd.h                      |   6 -
>  include/rpc/netdb.h                |   6 -
>  include/shadow.h                   |   6 -
>  include/stdio.h                    |  20 +--
>  libio/Makefile                     |   4 +-
>  libio/Versions                     |   1 -
>  libio/readline.c                   | 170 ---------------------
>  libio/tst-readline.c               | 237 -----------------------------
>  nss/Makefile                       |   4 +-
>  nss/Versions                       |   1 +
>  nss/nss_compat/compat-grp.c        |   6 +-
>  nss/nss_compat/compat-initgroups.c |   6 +-
>  nss/nss_compat/compat-pwd.c        |   6 +-
>  nss/nss_compat/compat-spwd.c       |   6 +-
>  nss/nss_fgetent_r.c                |  55 +++++++
>  nss/nss_files/files-XXX.c          |  82 ++++------
>  nss/nss_files/files-alias.c        |   5 +-
>  nss/nss_files/files-initgroups.c   |   6 +-
>  nss/nss_files/files-netgrp.c       |   5 +-
>  nss/nss_files/files-parse.c        |   6 +-
>  nss/nss_files_fopen.c              |  47 ++++++
>  nss/nss_parse_line_result.c        |  46 ++++++
>  nss/nss_readline.c                 |  99 ++++++++++++
>  pwd/fgetpwent_r.c                  |  43 +-----
>  shadow/fgetspent_r.c               |  43 +-----
>  34 files changed, 609 insertions(+), 711 deletions(-)
>  create mode 100644 gshadow/tst-fgetsgent_r.c
>  create mode 100644 include/nss_files.h
>  delete mode 100644 libio/readline.c
>  delete mode 100644 libio/tst-readline.c
>  create mode 100644 nss/nss_fgetent_r.c
>  create mode 100644 nss/nss_files_fopen.c
>  create mode 100644 nss/nss_parse_line_result.c
>  create mode 100644 nss/nss_readline.c
> 


-- 
Cheers,
Carlos.


      parent reply	other threads:[~2020-07-21  3:27 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-17  8:29 Florian Weimer
2020-07-17  8:30 ` [PATCH 01/11] nss_files: Consolidate file opening in __nss_files_fopen Florian Weimer
2020-07-21  3:27   ` Carlos O'Donell
2020-07-17  8:30 ` [PATCH 02/11] nss_compat: Do not use mmap to read database files (bug 26258) Florian Weimer
2020-07-21  3:27   ` Carlos O'Donell
2020-07-17  8:30 ` [PATCH 03/11] nss_files: Consolidate line parse declarations in <nss_files.h> Florian Weimer
2020-07-21  3:27   ` Carlos O'Donell
2020-07-17  8:30 ` [PATCH 04/11] nss_files: Use generic result pointer in parse_line Florian Weimer
2020-07-21  3:27   ` Carlos O'Donell
2020-07-17  8:30 ` [PATCH 05/11] libio: Add fseterr_unlocked for internal use Florian Weimer
2020-07-21  3:27   ` Carlos O'Donell
2020-07-17  8:30 ` [PATCH 06/11] nss: Add __nss_fgetent_r Florian Weimer
2020-07-21  3:27   ` Carlos O'Donell
2020-07-17  8:30 ` [PATCH 07/11] grp: Implement fgetgrent_r using __nss_fgetent_r Florian Weimer
2020-07-21  3:28   ` Carlos O'Donell
2020-07-17  8:30 ` [PATCH 08/11] gshadow: Implement fgetsgent_r using __nss_fgetent_r (bug 20338) Florian Weimer
2020-07-21  3:28   ` Carlos O'Donell
2020-07-17  8:30 ` [PATCH 09/11] pwd: Implement fgetpwent_r using __nss_fgetent_r Florian Weimer
2020-07-21  3:28   ` Carlos O'Donell
2020-07-17  8:30 ` [PATCH 10/11] shadow: Implement fgetspent_r " Florian Weimer
2020-07-21  3:28   ` Carlos O'Donell
2020-07-17  8:31 ` [PATCH 11/11] libio: Remove __libc_readline_unlocked Florian Weimer
2020-07-21  3:28   ` Carlos O'Donell
2020-07-21  3:27 ` Carlos O'Donell [this message]

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=513f6b26-4509-78ec-bdb0-a18fd9162764@redhat.com \
    --to=carlos@redhat.com \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@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).