Bug 2369561
Summary: | flistxattr with right size wrongly fails with ERANGE, breaking 'cp -a' etc | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Paul Eggert <eggert> |
Component: | kernel | Assignee: | Kernel Maintainer List <kernel-maint> |
Status: | NEW --- | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 42 | CC: | acaringi, adscvr, airlied, collin.funk1, hdegoede, hpa, josef, kernel-maint, linville, masami256, mchehab, p, ptalbert, steved, suraj.ghimire7 |
Target Milestone: | --- | Keywords: | Regression, TestCaseProvided |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | --- | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | Type: | --- | |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Paul Eggert
2025-05-31 14:57:34 UTC
Also, the flistxattr kernel bug breaks library functions like attr_copy_fd and attr_copy_file. These library functions can and should work around the kernel bug, so I filed a bug report for that upstream at <https://lists.nongnu.org/archive/html/acl-devel/2025-05/msg00003.html>. You can see the whole listxattr thread at <https://lists.nongnu.org/archive/html/acl-devel/2025-05/threads.html>. (In reply to Paul Eggert from comment #1) > Also, the flistxattr kernel bug breaks library functions like attr_copy_fd > and attr_copy_file. These library functions can and should work around the > kernel bug, so I filed a bug report for that upstream A patch to those library functions was installed (see <https://cgit.git.savannah.gnu.org/cgit/attr.git/commit/?id=58abfe6eba0d8d58a61ee8bee0615f74d393fff2>), so bleeding-edge libxattr on savannah.nongnu.org now works around the kernel bug. However, a new libxattr version hasn't been released and of course it would take some time for any such release to propagate to systems affected by the kernel bug. Also, libxattr needs at least one more patch, namely, patch 0001 in the email <https://lists.gnu.org/r/acl-devel/2025-06/msg00001.html> that I just sent to acl-devel. Today Stephen Smalley proposed a simple kernel patch <https://lore.kernel.org/linux-fsdevel/m1wm9qund4.fsf@gmail.com/T/> in the linux-fsdevel mailing list. Also, bleeding-edge libxattr how has the workaround fix <https://cgit.git.savannah.gnu.org/cgit/attr.git/commit/?id=504ab19d7b032212755ab3c7df16be98d5b5212e>, so bleeding-edge libxattr should now be immune to the kernel bug. (In reply to Paul Eggert from comment #3) > Today Stephen Smalley proposed a simple kernel patch > <https://lore.kernel.org/linux-fsdevel/m1wm9qund4.fsf@gmail.com/T/> in the > linux-fsdevel mailing list. I compiled a kernel with this proposed patch and confirmed that it fixes the issue [1]. [1] https://lore.kernel.org/selinux/87plfhsa2r.fsf@gmail.com/ |