Merged update from upstream sources

This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/glibc.git#d5ff3061a2c54ee0f30bb164d556f875daaea342
This commit is contained in:
DistroBaker 2020-12-16 08:14:09 +00:00
parent df9ce2ff57
commit 9b698aaac0
4 changed files with 43 additions and 177 deletions

View File

@ -1,59 +0,0 @@
From d74a39158ab4aafa8af874e996bf5ddbde593bc0 Mon Sep 17 00:00:00 2001
From: DJ Delorie <dj@redhat.com>
Date: Wed, 9 Dec 2020 21:46:30 -0500
Subject: nsswitch: handle missing actions properly
Some internal functions need to know if a database has a nonzero
list of actions; success getting the database does not guarantee
that. Add checks for such as needed.
Skip the ":" in each nsswitch.conf line so as not to add a dummy
action libnss_:.so
diff --git a/grp/initgroups.c b/grp/initgroups.c
index a60ca1c395..a0a836d862 100644
--- a/grp/initgroups.c
+++ b/grp/initgroups.c
@@ -72,11 +72,13 @@ internal_getgrouplist (const char *user, gid_t group, long int *size,
nss_action_list nip;
- if (__nss_database_get (nss_database_initgroups, &nip))
+ if (__nss_database_get (nss_database_initgroups, &nip)
+ && nip != NULL)
{
use_initgroups_entry = true;
}
- else if (__nss_database_get (nss_database_group, &nip))
+ else if (__nss_database_get (nss_database_group, &nip)
+ && nip != NULL)
{
use_initgroups_entry = false;
}
diff --git a/nss/nss_database.c b/nss/nss_database.c
index e8c307d1f3..a036e95fbf 100644
--- a/nss/nss_database.c
+++ b/nss/nss_database.c
@@ -212,7 +212,8 @@ process_line (struct nss_database_data *data, char *line)
if (line[0] == '\0' || name == line)
/* Syntax error. Skip this line. */
return true;
- *line++ = '\0';
+ while (line[0] != '\0' && (isspace (line[0]) || line[0] == ':'))
+ *line++ = '\0';
int db = name_to_database_index (name);
if (db < 0)
diff --git a/nss/nsswitch.c b/nss/nsswitch.c
index 40109c744d..921062e04f 100644
--- a/nss/nsswitch.c
+++ b/nss/nsswitch.c
@@ -81,7 +81,7 @@ __nss_database_lookup2 (const char *database, const char *alternate_name,
if (database_names[database_id] == NULL)
return -1;
- if (__nss_database_get (database_id, ni))
+ if (__nss_database_get (database_id, ni) && *ni)
{
/* Success. */
return 0;

View File

@ -1,111 +0,0 @@
Short description: Work ld.so --verify crash on debuginfo files.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Bug-RHEL: #741105, #767146
Upstream status: not-needed
This change is designed to work around running ld.so on a debuginfo
file. This is the wrong fix for this problem and should be dropped.
The correct solution is to mark debuginfo files as new types of
ELF files.
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 646c5dca40efcc9b..1f44ea3744f139f3 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -952,6 +952,18 @@ _dl_map_object_from_fd (const char *name, const char *origname, int fd,
in this information for the executable in case of an explicit
loader invocation. */
struct r_file_id id;
+ struct stat64 st;
+
+ if (__glibc_unlikely (!_dl_get_file_id (fd, &id, &st)))
+ {
+ errstring = N_("cannot stat shared object");
+ call_lose_errno:
+ errval = errno;
+ call_lose:
+ lose (errval, fd, name, realname, l, errstring,
+ make_consistent ? r : NULL, nsid);
+ }
+
if (mode & __RTLD_OPENEXEC)
{
assert (nsid == LM_ID_BASE);
@@ -959,16 +971,6 @@ _dl_map_object_from_fd (const char *name, const char *origname, int fd,
}
else
{
- if (__glibc_unlikely (!_dl_get_file_id (fd, &id)))
- {
- errstring = N_("cannot stat shared object");
- call_lose_errno:
- errval = errno;
- call_lose:
- lose (errval, fd, name, realname, l, errstring,
- make_consistent ? r : NULL, nsid);
- }
-
/* Look again to see if the real name matched another already loaded. */
for (l = GL(dl_ns)[nsid]._ns_loaded; l != NULL; l = l->l_next)
if (!l->l_removed && _dl_file_id_match_p (&l->l_file_id, &id))
@@ -1147,6 +1149,16 @@ _dl_map_object_from_fd (const char *name, const char *origname, int fd,
= N_("ELF load command address/offset not properly aligned");
goto call_lose;
}
+ if (__glibc_unlikely (ph->p_offset + ph->p_filesz > st.st_size))
+ {
+ /* If the segment requires zeroing of part of its last
+ page, we'll crash when accessing the unmapped page.
+ There's still a possibility of a race, if the shared
+ object is truncated between the fxstat above and the
+ memset below. */
+ errstring = N_("ELF load command past end of file");
+ goto call_lose;
+ }
struct loadcmd *c = &loadcmds[nloadcmds++];
c->mapstart = ALIGN_DOWN (ph->p_vaddr, GLRO(dl_pagesize));
diff --git a/sysdeps/generic/dl-fileid.h b/sysdeps/generic/dl-fileid.h
index 459328d28c62c8e1..5070580b1b0cc629 100644
--- a/sysdeps/generic/dl-fileid.h
+++ b/sysdeps/generic/dl-fileid.h
@@ -29,7 +29,8 @@ struct r_file_id
On error, returns false, with errno set. */
static inline bool
_dl_get_file_id (int fd __attribute__ ((unused)),
- struct r_file_id *id __attribute__ ((unused)))
+ struct r_file_id *id __attribute__ ((unused)),
+ struct stat64_t *st __attribute__((unused)))
{
return true;
}
diff --git a/sysdeps/posix/dl-fileid.h b/sysdeps/posix/dl-fileid.h
index b3c8166701650b8b..cd862f511e6e3e94 100644
--- a/sysdeps/posix/dl-fileid.h
+++ b/sysdeps/posix/dl-fileid.h
@@ -27,18 +27,16 @@ struct r_file_id
ino64_t ino;
};
-/* Sample FD to fill in *ID. Returns true on success.
+/* Sample FD to fill in *ID and *ST. Returns true on success.
On error, returns false, with errno set. */
static inline bool
-_dl_get_file_id (int fd, struct r_file_id *id)
+_dl_get_file_id (int fd, struct r_file_id *id, struct stat64 *st)
{
- struct stat64 st;
-
- if (__glibc_unlikely (__fstat64 (fd, &st) < 0))
+ if (__glibc_unlikely (__fstat64 (fd, st) < 0))
return false;
- id->dev = st.st_dev;
- id->ino = st.st_ino;
+ id->dev = st->st_dev;
+ id->ino = st->st_ino;
return true;
}

View File

@ -1,4 +1,4 @@
%define glibcsrcdir glibc-2.32.9000-374-g088e962537 %define glibcsrcdir glibc-2.32.9000-409-g4d0985543f
%define glibcversion 2.32.9000 %define glibcversion 2.32.9000
# Pre-release tarballs are pulled in from git using a command that is # Pre-release tarballs are pulled in from git using a command that is
# effectively: # effectively:
@ -96,7 +96,7 @@
Summary: The GNU libc libraries Summary: The GNU libc libraries
Name: glibc Name: glibc
Version: %{glibcversion} Version: %{glibcversion}
Release: 21%{?dist} Release: 22%{?dist}
# In general, GPLv2+ is used by programs, LGPLv2+ is used for # In general, GPLv2+ is used by programs, LGPLv2+ is used for
# libraries. # libraries.
@ -142,7 +142,6 @@ Source12: ChangeLog.old
Patch1: glibc-fedora-nscd.patch Patch1: glibc-fedora-nscd.patch
Patch3: glibc-rh697421.patch Patch3: glibc-rh697421.patch
Patch4: glibc-fedora-linux-tcsetattr.patch Patch4: glibc-fedora-linux-tcsetattr.patch
Patch5: glibc-rh741105.patch
Patch6: glibc-fedora-localedef.patch Patch6: glibc-fedora-localedef.patch
Patch8: glibc-fedora-manual-dircategory.patch Patch8: glibc-fedora-manual-dircategory.patch
Patch9: glibc-rh827510.patch Patch9: glibc-rh827510.patch
@ -158,9 +157,6 @@ Patch29: glibc-fedora-nsswitch.patch
Patch30: glibc-deprecated-selinux-makedb.patch Patch30: glibc-deprecated-selinux-makedb.patch
Patch31: glibc-deprecated-selinux-nscd.patch Patch31: glibc-deprecated-selinux-nscd.patch
# Temporary until official patch is committed upstream
Patch99: glibc-rh1906066.patch
############################################################################## ##############################################################################
# Continued list of core "glibc" package information: # Continued list of core "glibc" package information:
############################################################################## ##############################################################################
@ -2257,6 +2253,46 @@ fi
%files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared
%changelog %changelog
* Tue Dec 15 2020 Patsy Griffin <patsy@redhat.com> - 2.32.9000-22
- Auto-sync with upstream branch master,
commit 4d0985543f479a6f421d4d8a9e0d1dc71c9c2c53.
- elf: Record libc.so link map when it is the main program (bug 20972)
- Use GMP 6.2.1 in build-many-glibcs.py.
- aarch64: remove the strlen_asimd symbol
- aarch64: fix static PIE start code for BTI [BZ #27068]
- elf: Fix failure handling in _dl_map_object_from_fd
- elf: inline lose for error handling
- Remove strtoimax, strtoumax, wcstoimax, wcstoumax inlines
- nsswitch: handle missing actions properly
- x86: Remove the default REP MOVSB threshold tunable value [BZ #27061]
- elf.h: Remove SHF_GNU_BUILD_NOTE.
- elf.h: fix spelling typos in comments
- Fix spelling and grammar in several comments
- malloc: Detect infinite-loop in _int_free when freeing tcache [BZ#27052]
- elf: Fix dl-load.c
- elf: Include libc.so.6 as main program in dependency sort (bug 20972)
- support: Add support_slibdir_prefix variable
- aarch64: Use mmap to add PROT_BTI instead of mprotect [BZ #26831]
- elf: Pass the fd to note processing
- elf: Move note processing after l_phdr is updated
- aarch64: align address for BTI protection [BZ #26988]
- aarch64: Fix missing BTI protection from dependencies [BZ #26926]
- Fix linknamespace errors in nss_database.c if build with -Os.
- treewide: fix incorrect spelling of indices in comments
- linux: Consolidate brk implementation
- elf: Include <sys/param.h> in cache.c
- s390x: Add glibc-hwcaps support
- elf: Fix run-time dependencies of tst-dlopen-fail-2
- Handle out-of-memory case in svc_tcp.c/svc_unix.c:rendezvous_request.
- elf: Fix incorrect comparison in sort_priorities_by_name
- S390: Derive float_t from FLT_EVAL_METHOD
- Fix parsing of /sys/devices/system/cpu/online (bug 25859)
- Make strtoimax, strtoumax, wcstoimax, wcstoumax into aliases
- Fixed typos in "NEWS for version 2.32"
- Add NEWS entry for CVE-2020-29562 (BZ #26923)
- iconv: Fix incorrect UCS4 inner loop bounds (BZ#26923)
- Drop glibc-rh1906066 and glibc-rh741105 patches fixed by sync.
* Mon Dec 14 2020 Florian Weimer <fweimer@redhat.com> - 2.32.9000-21 * Mon Dec 14 2020 Florian Weimer <fweimer@redhat.com> - 2.32.9000-21
- Re-enable -Werror everywhere (#1888246) - Re-enable -Werror everywhere (#1888246)

View File

@ -1 +1 @@
SHA512 (glibc-2.32.9000-374-g088e962537.tar.xz) = e621b9a2e28491a1823f13541dc2d17ad812e6c8a12ae1b128dce0697280b8eb0571a06570b9e05ea1004d20d639f0193dfe425974bffccb9ff83bc14fd7c629 SHA512 (glibc-2.32.9000-409-g4d0985543f.tar.xz) = 5665bba5c9105a9799ba815ddcbce9bbd6c9b7789f4069821b4db0537456ac6754ff5d728e70ec8f94a51514fbfb77889f27ecfe72f5b0854230d5a03f883950