[Bug 1756209] Re: i386 implementation of memmove broken since glibc 2.21
Bionic has already been fixed. I could not reproduce the issue even with 2.27-3ubuntu1.2. gdb bt bt #0 run_test (move=0xf7f1c280 <__memmove_sse2_unaligned>) at memmove-bug.c:55 #1 0x56555643 in main (argc=1, argv=0xd4f4) at memmove-bug.c:82 (gdb) cont Continuing. move memory... Breakpoint 2, run_test (move=0xf7f1c280 <__memmove_sse2_unaligned>) at memmove-bug.c:53 53 printf("check memory...\n"); (gdb) cont Continuing. check memory... Breakpoint 2, run_test (move=0xf7f1c280 <__memmove_sse2_unaligned>) at memmove-bug.c:64 64 printf("no problems detected\n"); -- The test passes with the updated glibc, too: ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~/memmove-bug$ make ./memmove-bug || echo "memmove is BUGGY" allocating 2147483648 = 0x8000 bytes... start = 0x77db7010, end = 0xf7db7010 init memory... move memory... check memory... no problems detected Details for your system: GNU C Library (Ubuntu GLIBC 2.27-3ubuntu1.3) stable release version 2.27. cc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 5.4.0-52-generic #57~18.04.1-Ubuntu SMP Thu Oct 15 14:04:49 UTC 2020 ** Tags removed: verification-needed verification-needed-bionic ** Tags added: verification-done verification-done-bionic -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1756209 Title: i386 implementation of memmove broken since glibc 2.21 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1756209/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1756209] Re: i386 implementation of memmove broken since glibc 2.21
** Changed in: glibc (Ubuntu Bionic) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1756209 Title: i386 implementation of memmove broken since glibc 2.21 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1756209/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1756209] Re: i386 implementation of memmove broken since glibc 2.21
Hello Thomas, or anyone else affected, Accepted glibc into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/glibc/2.27-3ubuntu1.3 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed- bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification- failed-bionic. In either case, without details of your testing we will not be able to proceed. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping! N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days. ** Changed in: glibc (Ubuntu Bionic) Status: Confirmed => Fix Committed ** Tags added: verification-needed verification-needed-bionic -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1756209 Title: i386 implementation of memmove broken since glibc 2.21 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1756209/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1756209] Re: i386 implementation of memmove broken since glibc 2.21
** Description changed: + [Impact] + * i386 memmove breaks when crossing the 2GB threshold. + + [Test Case] + + * Compile and run the reproducer as described at + https://github.com/fingolfin/memmove-bug or observe string/test-memmove + test passing during the build/autopkgtest on i386. + + [Regression Potential] + + * Can break memmove, but this is unlikely since memmove is the very + function fixed by fixing signedness handling. + + [Original Bug Text] + In glibc 2.21 they optimized i386 memcpy: https://sourceware.org/ml/libc-alpha/2015-02/msg00119.html The implementation contained a bug which causes memmove to break when crossing the 2GB threshold. This has been filed with glibc here (filed by someone else, but I have requested an update from them as well): https://sourceware.org/bugzilla/show_bug.cgi?id=22644 Unfortunately they have not yet taken action on this bug, however I want to bring it to your attention in the hope that it can be patched into all current Ubuntu releases as soon as possible. I hope this is not improper procedure. Both myself and another (see comment 1 in the glibc bug report) have tested the patch provided in the above glibc bug report and it does appear to fix the problem, however I don't know what the procedure is for getting it properly confirmed/tested and merged into Ubuntu. As requested in the guidelines: 1) We are using: Description:Ubuntu 16.04.4 LTS Release:16.04 2) libc6:i386: - Installed: 2.23-0ubuntu10 + Installed: 2.23-0ubuntu10 However as stated above this has been present since libc6:i386 2.21 and affects Ubuntu 15.04 onward. (I have actually tested this as well. 15.04 conveniently used both glibc 2.19 and 2.21 so it was a good test platform when I was initially attempting to track down the problem.) 3) What we expected to happen: memmove should move data within the entire valid address space without segfaulting or corrupting memory. 4) What happened instead: When memmove attempts to move data crossing the 2GB threshold it either segfaults or causes memory corruption. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1756209 Title: i386 implementation of memmove broken since glibc 2.21 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1756209/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1756209] Re: i386 implementation of memmove broken since glibc 2.21
** Also affects: glibc (Ubuntu Xenial) Importance: Undecided Status: New ** Changed in: glibc (Ubuntu) Status: Confirmed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1756209 Title: i386 implementation of memmove broken since glibc 2.21 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1756209/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1756209] Re: i386 implementation of memmove broken since glibc 2.21
** Tags added: id-5ac41c8a07e3bbcc42edc5cb -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1756209 Title: i386 implementation of memmove broken since glibc 2.21 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1756209/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1756209] Re: i386 implementation of memmove broken since glibc 2.21
** Also affects: glibc (Ubuntu Bionic) Importance: Undecided Status: New ** Changed in: glibc (Ubuntu Bionic) Milestone: None => ubuntu-18.04 ** Changed in: glibc (Ubuntu Bionic) Importance: Undecided => High ** Changed in: glibc (Ubuntu Bionic) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1756209 Title: i386 implementation of memmove broken since glibc 2.21 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1756209/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1756209] Re: i386 implementation of memmove broken since glibc 2.21
Just to keep this up to date, they have now committed a patch to fix this. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1756209 Title: i386 implementation of memmove broken since glibc 2.21 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1756209/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs