public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug nss/26258] New: nss_compat should not read input files with mmap
@ 2020-07-17  7:40 fweimer at redhat dot com
  2020-07-17  7:50 ` [Bug nss/26258] " fweimer at redhat dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2020-07-17  7:40 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=26258

            Bug ID: 26258
           Summary: nss_compat should not read input files with mmap
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nss
          Assignee: unassigned at sourceware dot org
          Reporter: fweimer at redhat dot com
  Target Milestone: ---

nss_compat opens its input files like this, requesting the use of mmap from
fopen:

      ent->stream = fopen ("/etc/group", "rme");

This may result in crashes if the files are truncated while reading.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug nss/26258] nss_compat should not read input files with mmap
  2020-07-17  7:40 [Bug nss/26258] New: nss_compat should not read input files with mmap fweimer at redhat dot com
@ 2020-07-17  7:50 ` fweimer at redhat dot com
  2020-07-17  8:32 ` fweimer at redhat dot com
  2020-07-21 15:17 ` fweimer at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2020-07-17  7:50 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=26258

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at sourceware dot org   |fweimer at redhat dot com
              Flags|                            |security-
             Status|NEW                         |ASSIGNED

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug nss/26258] nss_compat should not read input files with mmap
  2020-07-17  7:40 [Bug nss/26258] New: nss_compat should not read input files with mmap fweimer at redhat dot com
  2020-07-17  7:50 ` [Bug nss/26258] " fweimer at redhat dot com
@ 2020-07-17  8:32 ` fweimer at redhat dot com
  2020-07-21 15:17 ` fweimer at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2020-07-17  8:32 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=26258

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com

--- Comment #1 from Florian Weimer <fweimer at redhat dot com> ---
Patch posted: https://sourceware.org/pipermail/libc-alpha/2020-July/116432.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug nss/26258] nss_compat should not read input files with mmap
  2020-07-17  7:40 [Bug nss/26258] New: nss_compat should not read input files with mmap fweimer at redhat dot com
  2020-07-17  7:50 ` [Bug nss/26258] " fweimer at redhat dot com
  2020-07-17  8:32 ` fweimer at redhat dot com
@ 2020-07-21 15:17 ` fweimer at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2020-07-21 15:17 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=26258

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED
   Target Milestone|---                         |2.32

--- Comment #2 from Florian Weimer <fweimer at redhat dot com> ---
Fixed for glibc 2.32 via:

commit 23ed36735af09c258e542266aaed92cdd8571c6c
Author: Florian Weimer <fweimer@redhat.com>
Date:   Thu Jul 16 16:21:28 2020 +0200

    nss_compat: Do not use mmap to read database files (bug 26258)

    This avoids crashes in case the files are truncated for some reason.
    For typically file sizes, it is also going to be slightly faster.
    Using __nss_files_fopen instead mirrors what nss_files does.

    Tested-by: Carlos O'Donell <carlos@redhat.com>
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-21 15:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-17  7:40 [Bug nss/26258] New: nss_compat should not read input files with mmap fweimer at redhat dot com
2020-07-17  7:50 ` [Bug nss/26258] " fweimer at redhat dot com
2020-07-17  8:32 ` fweimer at redhat dot com
2020-07-21 15:17 ` fweimer at redhat dot com

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).