Bug 2183056
| Summary: | [RHEL 9] BUG: KASAN: use-after-free in unix_gid_show+0x2c4/0x340 [sunrpc] | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Zhi Li <yieli> |
| Component: | kernel | Assignee: | Jeff Layton <jlayton> |
| kernel sub component: | NFS | QA Contact: | Zhi Li <yieli> |
| Status: | CLOSED DUPLICATE | Docs Contact: | |
| Severity: | unspecified | ||
| Priority: | unspecified | CC: | jiyin, jlayton, nfs-team, xzhou, yoyang |
| Version: | 9.2 | Keywords: | Triaged |
| Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-05-15 14:34:34 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Zhi Li
2023-03-30 10:22:52 UTC
Given that this fired on the grouplist and not on the unix_gid object itself is a significant hint, I think. The unix_gid object is RCU freed, but the group list is not. I think we need to ensure that the grouplist is only freed after the RCU grace period. I have a patch that I think might fix this. Is this reliably reproducible at all? I can give you a test kernel if so. (In reply to Jeff Layton from comment #1) > Given that this fired on the grouplist and not on the unix_gid object itself > is a significant hint, I think. The unix_gid object is RCU freed, but the > group list is not. I think we need to ensure that the grouplist is only > freed after the RCU grace period. > > I have a patch that I think might fix this. Is this reliably reproducible at > all? I can give you a test kernel if so. Yes, there is a 20% probability to reproduce this problem stably using the internal existing test case. I will test it once I get a test kernel. Thanks for testing it! I sent the patch upstream yesterday: https://lore.kernel.org/linux-nfs/D3F3D553-C252-47FB-9D41-9C9A254557DB@oracle.com/T/#m41c9e5ad9313c80d9e083de4d1263ebf2aa9abc2 I think we should aim for 9.3.0 for this patch. I don't believe this is a regression, just a long-standing race condition that's not easy to hit. |