[Bug 2001975] [NEW] overflow bug in wcsncmp_avx2

Simon Chopin 2001975 at bugs.launchpad.net
Thu Jan 5 15:33:06 UTC 2023


Public bug reported:

[Impact]

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

Note that we're only impacted by the avx2 issue, the evex-optimized
version isn't present in the 2.31 branch.

[Test case]

> test_wcsncmp.c cat <<EOF
#include <wchar.h>
#include <assert.h>

int
main(int argc, char ** argv) {
    assert(__wcsncmp_avx2(L"abc", L"abd", (1UL << 62)) != 0);
}
EOF
gcc -static -o test_wcsncmp test_wcsncmp.c
./test_scsncmp

[Regression potential]

The patch is contained within the AVX-2 optimized routine, but it could
still cause introduce a new bug there. In addition, we could see
performance regressions.

** Affects: glibc (Ubuntu)
     Importance: Medium
     Assignee: Simon Chopin (schopin)
         Status: Fix Released

** Affects: glibc (Ubuntu Focal)
     Importance: Medium
     Assignee: Simon Chopin (schopin)
         Status: In Progress

** Also affects: glibc (Ubuntu Focal)
   Importance: Undecided
       Status: New

** Changed in: glibc (Ubuntu)
       Status: New => Fix Released

** Changed in: glibc (Ubuntu Focal)
       Status: New => In Progress

** Changed in: glibc (Ubuntu Focal)
     Assignee: (unassigned) => Simon Chopin (schopin)

** Changed in: glibc (Ubuntu Focal)
   Importance: Undecided => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to glibc in Ubuntu.
https://bugs.launchpad.net/bugs/2001975

Title:
  overflow bug in wcsncmp_avx2

Status in glibc package in Ubuntu:
  Fix Released
Status in glibc source package in Focal:
  In Progress

Bug description:
  [Impact]

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

  Note that we're only impacted by the avx2 issue, the evex-optimized
  version isn't present in the 2.31 branch.

  [Test case]

  > test_wcsncmp.c cat <<EOF
  #include <wchar.h>
  #include <assert.h>

  int
  main(int argc, char ** argv) {
      assert(__wcsncmp_avx2(L"abc", L"abd", (1UL << 62)) != 0);
  }
  EOF
  gcc -static -o test_wcsncmp test_wcsncmp.c
  ./test_scsncmp

  [Regression potential]

  The patch is contained within the AVX-2 optimized routine, but it
  could still cause introduce a new bug there. In addition, we could see
  performance regressions.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/2001975/+subscriptions




More information about the foundations-bugs mailing list