Cause: On certain s390x platforms (z15, previously known as arch13), the strstr function did not correctly update a CPU register when handling search patterns which cross a page boundary.
Consequence: strstr could return false matches.
Fix: The page boundary case in the strstr function variant for z15 was changed to update the correct CPU register.
Result: strstr no longer returns false matches for a truncated pattern.
Upstream commit:
commit bfdb731438206b0f70fe7afa890681155c30b419
Author: Stefan Liebler <stli.com>
Date: Wed Nov 27 12:35:40 2019 +0100
S390: Fix handling of needles crossing a page in strstr z15 ifunc-variant. [BZ #25226]
If the specified needle crosses a page-boundary, the s390-z15 ifunc variant of
strstr truncates the needle which results in invalid results.
This is fixed by loading the needle beyond the page boundary to v18 instead of v16.
The bug is sometimes observable in test-strstr.c in check1 and check2 as the
haystack and needle is stored on stack. Thus the needle can be on a page boundary.
check2 is now extended to test haystack / needles located on stack, at end of page
and on two pages.
This bug was introduced with commit 6f47401bd5fc71209219779a0426170a9a7395b0
("S390: Add arch13 strstr ifunc variant.") and is already released in glibc 2.30.
Comment 3Hanns-Joachim Uhl
2019-11-28 14:42:31 UTC
fyi ... IBM will do fix verification ... setting OtherQA ...
Comment 6Hanns-Joachim Uhl
2020-01-08 12:38:42 UTC
(In reply to Sergey Kolosov from comment #5)
> IBM, could you verify the bug please?
.
Hello Red Hat / Florian,
can you please provide us the updated "glibc-2.28-72.el8_1.1" rpm _for s390x_ for our verification ..?
Please advise ...
Thanks for your support.
(In reply to Hanns-Joachim Uhl from comment #6)
> (In reply to Sergey Kolosov from comment #5)
> > IBM, could you verify the bug please?
> .
> Hello Red Hat / Florian,
> can you please provide us the updated "glibc-2.28-72.el8_1.1" rpm _for
> s390x_ for our verification ..?
> Please advise ...
> Thanks for your support.
I've provided download instructions by email.
------- Comment From STLI.com 2020-01-09 06:25 EDT-------
I've installed RHEL 8.1 with the provided glibc 2.28-72.el8_1.1 package and verified that the patch is applied.
Thanks
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2020:0336
Upstream commit: commit bfdb731438206b0f70fe7afa890681155c30b419 Author: Stefan Liebler <stli.com> Date: Wed Nov 27 12:35:40 2019 +0100 S390: Fix handling of needles crossing a page in strstr z15 ifunc-variant. [BZ #25226] If the specified needle crosses a page-boundary, the s390-z15 ifunc variant of strstr truncates the needle which results in invalid results. This is fixed by loading the needle beyond the page boundary to v18 instead of v16. The bug is sometimes observable in test-strstr.c in check1 and check2 as the haystack and needle is stored on stack. Thus the needle can be on a page boundary. check2 is now extended to test haystack / needles located on stack, at end of page and on two pages. This bug was introduced with commit 6f47401bd5fc71209219779a0426170a9a7395b0 ("S390: Add arch13 strstr ifunc variant.") and is already released in glibc 2.30.