Summary: | sys-apps/portage - fails to create build-id symlinks when non-hardlinked files have the same build id | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Jonathan Callen <en.ABCD> |
Component: | Core - Ebuild Support | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | sam |
Priority: | Normal | Keywords: | InVCS |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://github.com/gentoo/portage/pull/786 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 837899 | ||
Bug Blocks: | |||
Attachments: | fake-example-1.0.ebuild |
Patch sent for review. https://archives.gentoo.org/gentoo-portage-dev/message/60835a6258f7d279408c8c0e551c96c1 The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=d610d14325fbe65f9a011d643be74c95098c3241 commit d610d14325fbe65f9a011d643be74c95098c3241 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2022-02-02 18:07:19 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2022-02-02 18:11:29 +0000 estrip: fix race when creating build-id debug symlinks Bug: https://bugs.gentoo.org/831927 Closes: https://github.com/gentoo/portage/pull/786 Signed-off-by: Mike Gilbert <floppym@gentoo.org> bin/estrip | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) |
Created attachment 763417 [details] fake-example-1.0.ebuild When using FEATURES=splitdebug, if the same ELF is installed multiple times without using hard links or symlinks, Portage sometimes fails to create the build-id symlink to the file due to a TOCTTOU failure. Attached is a sample ebuild that reliably causes this issue for me (make sure that MAKEOPTS is set to allow parallel builds).