Bug 2251557
Summary: | glibc: Corrupt DTV after reuse of a TLS module ID following dlclose with unused TLS | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Hector Martin <marcan> | ||||
Component: | glibc | Assignee: | Carlos O'Donell <codonell> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 39 | CC: | arjun.is, codonell, dj, fberat, fweimer, jlaw, kjoonlee, mcermak, mcoufal, mfabian, ngompa13, pfrankli, sipoyare, skolosov, szabolcs.nagy | ||||
Target Milestone: | --- | Keywords: | Patch | ||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | glibc-2.38.9000-26.fc40 glibc-2.38-16.fc39 glibc-2.37-18.fc38 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2024-02-09 14:36:31 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
Hector Martin
2023-11-26 12:15:31 UTC
Created attachment 2001506 [details]
Proposed patch (confirmed fixes the issue)
Added some links to GNOME bugs ultimately caused by this. On further reflection, similar but not caused by this bug, so removed. (In reply to Hector Martin from comment #1) > Created attachment 2001506 [details] > Proposed patch (confirmed fixes the issue) can you please submit this patch to the libc-alpha list. (In reply to Szabolcs Nagy from comment #4) > (In reply to Hector Martin from comment #1) > > Created attachment 2001506 [details] > > Proposed patch (confirmed fixes the issue) > > can you please submit this patch to the libc-alpha list. Done. Please can we get this committed to the Fedora glibc package in the meantime? This is seriously breaking our systems... It's probably breaking other things too, seeing as it's a fully reproducible bug that doesn't depend on race conditions or anything like that, and is architecture-independent. I'm sure we're not the first to hit this, just nobody bothered to debug it until now (even though it was known for over 1.5 years)... (In reply to Hector Martin from comment #7) > It's probably breaking other things too, seeing as it's a fully reproducible > bug that doesn't depend on race conditions or anything like that, and is > architecture-independent. note that aarch64 is the only target defaulting to tlsdesc, other targets would only hit it with specific modules that explicitly build with tlsdesc (and only x86, arm, aarch64 has tlsdesc support currently). traditional tls does not look at the generation count at reloc processing time, only at __tls_get_addr call time, while tlsdesc does to use it in the dynamic tlsdesc fast path. > note that aarch64 is the only target defaulting to tlsdesc, other targets would
> only hit it with specific modules that explicitly build with tlsdesc (and only
> x86, arm, aarch64 has tlsdesc support currently).
I guess Mesa must build with that option on then (or is this an Arch thing?), since the original bug report was on x86-64.
Upstream review for this is complete with a Reviewed-by from Szabolcs who will commit this: https://patchwork.sourceware.org/project/glibc/patch/20231128-tls-modid-reuse-v1-1-431c73f37fc7@marcan.st/ Once the patch is in upstream we can sync this with Rawhide and F39. I would hope this also gets fixed in F38, since that is still supported. (In reply to Hector Martin from comment #11) > I would hope this also gets fixed in F38, since that is still supported. Yes, we will backport it upstream and sync Fedora to the upstream release branch. This is fixed in Rawhide (F40) and still needs to be backported into F39 and F38 (as requested). This has been backported to upstream glibc 2.37, and 2.38, so this can be brought directly into the F39 and F38 builds of glibc. commit 874d4186975560fb79d5ebd46a4f378a2e3f7657 Author: Hector Martin <marcan> AuthorDate: Tue Nov 28 15:23:07 2023 +0900 Commit: Szabolcs Nagy <szabolcs.nagy> CommitDate: Fri Dec 22 14:37:46 2023 +0000 elf: Fix TLS modid reuse generation assignment (BZ 29039) Fixed in all supported Fedora releases. |