]> git.ipfire.org Git - thirdparty/glibc.git/commit
elf: Earlier missing dynamic segment check in _dl_map_object_from_fd
authorFlorian Weimer <fweimer@redhat.com>
Fri, 5 Nov 2021 16:01:24 +0000 (17:01 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 5 Nov 2021 18:34:16 +0000 (19:34 +0100)
commitea32ec354c65ddad11b82ca9d057010df13a9cea
treeecc543a6270d1ab51b1ac4b27a720f0577be8046
parentff012870b2c02a62598c04daa1e54632e020fd7d
elf: Earlier missing dynamic segment check in _dl_map_object_from_fd

Separated debuginfo files have PT_DYNAMIC with p_filesz == 0.  We
need to check for that before the _dl_map_segments call because
that could attempt to write to mappings that extend beyond the end
of the file, resulting in SIGBUS.

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
elf/dl-load.c