Summary: | libelf elf_update fails when adding sections | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Eric McCorkle <emc2> | ||||
Component: | misc | Assignee: | freebsd-toolchain (Nobody) <toolchain> | ||||
Status: | New --- | ||||||
Severity: | Affects Only Me | CC: | cem, emaste, jkoshy, kaiw | ||||
Priority: | --- | Keywords: | patch | ||||
Version: | CURRENT | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Review for fix: https://reviews.freebsd.org/D10487 Drop from 12.0 tracking; there is an open question in the review and this is unlikely to be resolved before release. |
Created attachment 182066 [details] Patch to fix the problem The libelf file in base fails to perform elf_update when growing the file by adding new sections, because elf_getdata erroneously checks section boundaries against the old file size. This can be fixed by omitting this check when doing elf_update. The attached patch fixes the problem.