Bug 87940
Summary: | reading uninitialized memory in _dl_relocate_object_internal | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | John Reiser <jreiser> | ||||
Component: | glibc | Assignee: | Jakub Jelinek <jakub> | ||||
Status: | CLOSED NOTABUG | QA Contact: | Brian Brock <bbrock> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 9 | CC: | drepper, fweimer | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i686 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2003-04-04 14:00:46 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
John Reiser
2003-04-03 21:12:39 UTC
Created attachment 90882 [details]
input commands to reproduce bug, with output transcript
Piping into gdb does not work for me, so I copy+paste each line individually.
No, you're looking at very different source to what _dl_relocate_object is doing at those instructions. The read from unitialized stack is in the second _ELF_DYNAMIC_DO_RELOC macro definition in elf/dynamic-link.h: for (ranges_index = 0; ranges_index < 2; ++ranges_index) \ elf_dynamic_do_##reloc ((map), \ ranges[ranges_index].start, \ ranges[ranges_index].size, \ ranges[ranges_index].lazy); \ second iteration of the loop, ie. read from ranges[1].start. Yes, it is read from unitialized memory, but does it matter? ranges[1].size is initialized (to 0) if this happens, and if 3rd arg to elf/do-rel.h's elf_machine_do_rel is 0, the second (nor fourth) argument don't matter at all (end = reladdr + 0 and so all the loops with r < end condition are never executed. |