public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug string/28755] New: overflow bug in wcsncmp_avx2 and wcsncmp_evex
@ 2022-01-09 10:30 goldstein.w.n at gmail dot com
  2022-01-09 14:07 ` [Bug string/28755] " hjl.tools at gmail dot com
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: goldstein.w.n at gmail dot com @ 2022-01-09 10:30 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28755

            Bug ID: 28755
           Summary: overflow bug in wcsncmp_avx2 and wcsncmp_evex
           Product: glibc
           Version: 2.34
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: string
          Assignee: unassigned at sourceware dot org
          Reporter: goldstein.w.n at gmail dot com
  Target Milestone: ---

Similiar to [BZ 27974](https://sourceware.org/bugzilla/show_bug.cgi?id=27974).
The multiply of length by sizeof (wchar_t) can overflow if length is >= 2^62
which can lead to incorrect results.

For example:

#include <wchar.h>
int
main(int argc, char ** argv) {
    assert(__wcsncmp_evex(L"abc", L"abd", (1UL << 62)) != 0);
    assert(__wcsncmp_avx2(L"abc", L"abd", (1UL << 62)) != 0);
}

Will fail on either assert.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2022-02-17 19:52 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-09 10:30 [Bug string/28755] New: overflow bug in wcsncmp_avx2 and wcsncmp_evex goldstein.w.n at gmail dot com
2022-01-09 14:07 ` [Bug string/28755] " hjl.tools at gmail dot com
2022-01-10  0:29 ` goldstein.w.n at gmail dot com
2022-01-11  3:07 ` goldstein.w.n at gmail dot com
2022-01-27  4:24 ` cvs-commit at gcc dot gnu.org
2022-01-27  4:58 ` cvs-commit at gcc dot gnu.org
2022-01-27 13:14 ` cvs-commit at gcc dot gnu.org
2022-01-27 13:29 ` cvs-commit at gcc dot gnu.org
2022-01-27 13:33 ` cvs-commit at gcc dot gnu.org
2022-01-27 15:28 ` cvs-commit at gcc dot gnu.org
2022-01-27 16:12 ` cvs-commit at gcc dot gnu.org
2022-01-27 16:14 ` hjl.tools at gmail dot com
2022-02-17 19:04 ` cvs-commit at gcc dot gnu.org
2022-02-17 19:14 ` cvs-commit at gcc dot gnu.org
2022-02-17 19:22 ` cvs-commit at gcc dot gnu.org
2022-02-17 19:27 ` cvs-commit at gcc dot gnu.org
2022-02-17 19:32 ` cvs-commit at gcc dot gnu.org
2022-02-17 19:40 ` cvs-commit at gcc dot gnu.org
2022-02-17 19:43 ` cvs-commit at gcc dot gnu.org
2022-02-17 19:48 ` cvs-commit at gcc dot gnu.org
2022-02-17 19:52 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).